Fix pawn movement bug when using mementos Pawns will recalculate position and direction upon memento usage, so advanced ones will move in the wrong direction
Tasks
Definition of game module
Usage of an UUID generated on frontend to identify specific games
Creation of a board builder
Definition of a Board module with top level operations (piece movement etc)
Creation of piece factories
Creation of piece movement strategies modules
Pawn movement
Pawn becomes queen at the end of the board
Rook movement
Bishop movement
Horse movement
Queen movement as a composite of rook & bishop
King movement (missing diagonal movements as of now)
Creation of simple CPUplayer which makes a random movement
Improve error message handling
Adding logic to the rules of the game:
Evaluate check (could use getAllCoordinatesThreatenedByColor on board.js)
Force movement of the king in check player (player & cpu player)
Evaluate checkmate -> end of game
-- Extra:
Memento to undo/redo movements. (jmrv)
(Experimental) Flyweight to avoid using strings as mementos
-- (Potential next version)
Level CPU Player:
Level 0 - random movement
Level 1 - evaluate & choose kill movement if is possible
Technical documentation & style guide must be enhanced with detailed comparisons on decided coding style patterns (classes, clousures, constructor functions, factory functions), comparing their limitations, pros, inheritance compatibility and backing it up with bibliography.
Unify code examples for all styles
Classes
Closures
Constructor functions
Factory functions
Decide style guide document structure
Create full class UML diagram to place on both technical and main documentation
Add design pattern documentation to main document
Add coding styles to technical documentation (ONLY AFTER TUTOR VERIFICATION)
Find bibliography and sources
Add existing references on comments from /codingStyles to bibliography
Add existing references from README.md technical documentation