Package-level declarations

Overview

Serializer implementations for converting core domain types to/from text format for persistence.

Serializers

  • GameStateSerializer — Serializes complete game state to/from text

  • BoardSerializer — Serializes board configuration (size and pieces)

  • PlayerSerializer — Serializes player data (type and points)

  • PieceSerializer — Serializes individual piece positions

  • PieceTypeSerializer — Serializes piece type symbols (# for BLACK, @ for WHITE)

Responsibilities

  • Converting immutable domain objects to text representation

  • Parsing text files back to domain objects

  • Ensuring round-trip serialization preserves data integrity

  • Providing human-readable save file format

Format Example

#,12;@,5;
#

8
4,4,@
4,5,#
5,4,#
5,5,@

First line: Players (symbol, points)
Second line: Last player
Third line: Winner (if any)
Fourth line: Board size
Remaining lines: Pieces (row, col, symbol)

Types

Link copied to clipboard

Serializer for the Board class, converting it to and from a String representation.

Link copied to clipboard

Serializer for the GameState class, converting it to and from a String representation.

Link copied to clipboard

Serializer for the Piece class, converting it to and from a String representation.

Link copied to clipboard

Serializer for the PieceType enum, converting it to and from a Char representation.

Link copied to clipboard

Serializer for Player. Format: "," where is the piece symbol (e.g. 'B' or 'W') and is the integer number of points the player has.