Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.7 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.7 KB

Draughts game

Your task is implement draughts game (https://en.wikipedia.org/wiki/Draughts) using provided mock of classes. Implementation should follow all OOP and SOLID principles. Implementation should follow TDD principles.

You supplied with following structures:

  1. Figure – interface, abstraction for figure on the board.
  2. GameRule – interface, abstraction for concrete game rules.
  3. Board - class, abstraction for chess board, holds figures on plate with size X * X.
  4. Color – enum, abstraction for figure color.
  5. Game – class, abstraction for game, hold all related game play information.
  6. Player – class, abstraction for player participated in the game.

Implementation should be divided into two parts.

In first part, you should implement the following

  1. Create both Man and King data structures. Classes should satisfy tests provided KingTest, ManTest.
  2. Create rules for russian draughts game. (For simplification, you can consider each player can beat, move only once per turn). Implementation should satisfy DraughtsRulesTest
In second part, you should implement the following
  1. Implement operation Undo, Redo for last user move. Add tests for operations.
  2. Write implementation for GameStateDao and store state of the game into json and xml file. Add possibility for GameRule object to recover from last state saved state. Add tests for DAOs.

All implementation code should be property formatted and follow code conventions. Code will be checked by Checkstyle maven plugin with Google code profile.

PS: Optionally you can implement rules and figures for chess game.

Good luck!