Skip to main content
4 of 6
added 65 characters in body
Adi
  • 19
  • 2

Very good first attempt.

Code follows C-style patterns.

For more Java/OOPS-style

Try incorporating these into code:

  1. Solid Patterns
    1.1. Segregate Actors and Actions
    1.2. Actors are Data Class
    1.2.1. ex: position on board
    1.2.2. internal actions of data, ex: horse can move in 4 directions, pawn in one
    1.3. Actions can be Strategy
    1.4. We can make class for engine with composition with Data Class + Actions
    1.5. Later Actions can come from AI Engine
    Bonus: Actions Validation Engine

  2. Use Lombok
    2.1. Code will be lot cleaner

  3. Create Interfaces
    3.1. Will make actions more clearer

Adi
  • 19
  • 2