-
Notifications
You must be signed in to change notification settings - Fork 0
nharleytran/chess-game
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TEAM Name: Kenneth Elsman JHED: kelsman1 Name: Yensabro Kanashiro JHED: ykanash1 Name: Harley Tran JHED: ntran27 DESIGN 1. Looping Through Board: We looped through the board wherever needed using the character ascii values, allowing us to add and subtract in order to move along the rows and columns of the board. 2. Rule of 3 Implementation: We implemented rule of 3 for the board class which frees previously allocated piece memory if necessary before creating a copy of the board. This duplication is used to carry out a move in the fake game board to see if it is legal. This method is also used for the in_check, in_mate, and in_stalemate functions. 3. Piece Movement: In order to move a piece, a series of check must be passed starting with making sure that the piece you are trying to move is even on the board, and ending with making sure that the movement doesn't lead to your king being in check. Furthermore, there is also a path_clear_check function in game.cpp that checks if the path is clear from the start to end positions if the path is along a vertical, horizontal, or diagonal line. 4. Point Value: We implemented a point_value function in piece.h, along with all of the derived piece classes. A piece's respected value can be called by making use of polymorphism in order to override the piece.h point_value function wherever needed. This way the point_value function in the game class is agnostic relative to the piece, so it would be able to handle the mystery piece as well. 5. Board Display: The terminal displays a grid of black and white squares based on position value (odd or even) along with displaying the pieces using chess symbols. Furthermore, letters and numbers indicating the position of each square are shown on all sides of the grid. It is highly recommended to use dark mode to fully appreciate the aesthetics of the design. 6. Readability: We used the in_check function inside of in_mate and in_stalemate to improve readability and utilize the in_check logic inside these functions. COMPLETENESS Our program fulffils the spefications provided in the project description to its fullest.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published