Package-level declarations

Overview

Provides the main game types and coordination layer. The module contains small, focused components that model the board, pieces, players and the game orchestration. It is intentionally free of any I/O concerns so it can be used by CLI, GUI or test code without modification.

Key classes

  • Game — lightweight, immutable carrier for a game session. Orchestrates moves, passes and state transitions.

  • GameLogic — pure logic that validates moves, computes captures and available plays.

  • Player — represents a player and provides helper methods to refresh points and swap piece type.

  • CoreConfig — Configuration for core game settings loaded from reversi-core.properties

  • Environment — Constants for file paths and configuration

Responsibilities

  • Representing the board, pieces, coordinates and piece types as immutable data types

  • Enforcing move validation and piece capture rules (Reversi)

  • Providing deterministic, testable transformations that return new board/game instances

  • Defining small storage-friendly DTOs (GameState) used by the storage module

  • Managing core configuration and environment settings

Types

Link copied to clipboard
class CoreConfig(val map: Map<String, String>) : Config

Configuration holder for core game parameters loaded from properties files. Manages character representations and storage configuration.

Properties

Link copied to clipboard
const val SIDE_MAX: Int = 26

Maximum allowed board side length.

Link copied to clipboard
const val SIDE_MIN: Int = 4

Minimum allowed board side length.

Functions

Link copied to clipboard

Loads the core module configuration from the configuration file. Creates the file with default values if it doesn't exist.

Link copied to clipboard

Saves the core module configuration to the configuration file.