This README file contains essential information about a game implemented in Haskell, the 7 main functions of the bot used in the game and how to execute and test the bot.
Ploy is an abstract strategy board game for two or four players, played on a 9x9 board with a set of 15 pieces (2-handed) or 9 pieces (4-handed and partnership games) per player. Pieces have various horizontal, vertical or diagonal moves somewhat like chess pieces, except directions of movement are limited; pieces change directions of movement by "rotating". Object of the game is to capture the opponent's Commander (analogous to the king in chess), or all of his other pieces.
The game can be executed on webserver and you can play against the CPU. The more detailed explanation and some necesssary commands for execution can be found in a specific README.md file in this dir.
- Run all tests:
stack test - Run validation tests:
stack test ploy:validate - Run unit tests:
stack test ploy:units - Run grading tests:
stack test ploy:grading - Run tests with coverage:
stack test --coverage ...
- stack build
- stack cleanThis function validates a given Forsyth-Edwards Notation (FEN) representation, checking if it represents a valid board configuration.
This function constructs the board using a given FEN representation.
This function returns the line between two given positions.
This function checks whether the game has ended. It considers the number of pieces on the board and specific conditions to determine the result.
This function checks whether a given move is valid. It examines the movement of the piece and the other pieces on the board.
This function returns the possible moves from a given position for a specific piece.
This function returns all possible moves for a specific player's current state.