Question
Model an eight-by-eight board. Each piece is one side's, and each piece is regular or king. There is no hidden grader. The work is the data model and the method boundaries. ## Requirements - A move check confirms the piece belongs to the player, the destination is empty, the step is diagonal, and the direction matches the piece type. - A capture jumps an opposing piece and may continue in a chain. - A piece that reaches the far row becomes a king. - The game ends when the opponent has no pieces or no legal move. - Represent the board as a grid of optional pieces. - Say whether each move returns a new board or changes the old one. - Keep rules in their own checker, separate from board state, so an opponent can later be an automated player. ## Review checklist 1. Does a regular piece get rejected when it moves backward, while a king is allowed that direction? 2. Does a capture remove the jumped piece and allow another jump from the landing square? 3. Does reaching the far row change that piece into a king before the next move? 4. Does the end check treat "no legal move" the same as "no pieces"? ## Staged follow-ups 1. Write the board type and a single-step move check, without captures. 2. Add one capture and then a chain of captures. 3. Add promotion and the end-of-game check. 4. Name the next method you would split out if you had another hour, and what state that method is allowed to see.