starting point is Board class - represents pieces on the chess board & holds all related state/actions for status, movement, checking, special-move-bar-info, etc.
board representation
The Board class will hold state:
- fields - array containing 64
Fieldobjects that containPieces - turn - which party is currently to making move (
WHITE/BLACK) - moves - stack to push/pop moves
- energy - special-move-bar energy progress for each party (0-100)
- ...
& provide mutations:
- validate - validates a potential move
- move - pushes a new move on to the
movesstack for the current party that hasturn - challenge - challenges the latest move on
movesstack for the party that hasturn. if validation of this move is illegal, latest move will be popped frommovesstack & party that hadturnprior to this move will haveenergyreset. if validation of this move was legal, the party that currently hasturnwill haveenergyreset. - getPotentialMoves - gets all valid potential moves for a certain piece that stands on a certain field
- ...
- standard chess starting position of pieces in
fieldsarray turnassigned to white (dice roll will decide which gets white)movesempty stackenergyset to 0 for both parties- ...
