C++ Project: Silly Chess
Part 1: Unit Tests
Write unit tests for the existing code. This is probably the
least fun but also the most useful part of the assignment. As you
make changes to the code, you will probably make some bugs. If you
write good unit tests, it will be easier for you to find and fix
those bugs so you will save time.
Part 2: Custom Pieces
lots of example code points you can search through
Please add your piece to chess_piece.h and
chess_pieces.cpp. You will only submit these two
files.
Learning Goals Here's what you'll learn/practice in this assignment: • Unit Tests • Version Control with Git (if you want) Working on a big project! Dynamic Multi-dimensional Arrays ● Serialization • Inheritance • Pseudo Random Number Generators .A.I. in Games High-level Idea Making a game is... hard because there are so many parts to making a game but that also makes it great for practicing coding and getting creative. In this project, you will take a slightly-simplified version of Chess I wrote in C++ and add things to it: new kinds of pieces, new board layouts, and even computer A.l.s.
mikelmcdaniel / silly-chess Public <> Code O Issues Pull requests → Actions Security Insights main 1 branch 0 tags mikelmcdaniel Make it easy to override where output goes for chess. 216191d 4 days ago 19 .gitignore Ignore VSCode configs. README.md Add initial README.md chess.cpp Make it easy to override where output goes for chess. 1 chess_board.cpp Adding initial source files for silly chess. " chess_board.h Remove redundant declaration of ostream left shift operator for Board. 19 0 chess_pieces.h Make all global ChessPiece objects global. They should never be modif... Make all global ChessPiece objects global. They should never be modif... " chess_player.cpp Ignore extra input when move is successful chess_player.h Adding initial source files for silly chess. 1 utf8_codepoint.cpp Adding initial source files for silly chess. utf8_codepoint.h Fix include to include cstdint instead of uchar.h, which s not avail... Silly Chess! It's chess but with less rules. • Pawns don't move 2 spaces on their first turn • Pawns can't promote/change to other pieces when the get to the end of the board • No castling: King cannot swap with a Rook • No check or checkmate Projects chess_pieces.cpp README.md Wiki Go to fil
Code Commits Issues Discussions Packages Wikis Languages C++ Advanced search Cheat sheet Terms Privacy Ⓒ2022 GitHub, Inc. 1 code result in mikelmcdaniel/silly-chess or view all results on GitHub 0 /chess.cpp 0 44 Team winner = board.winner(); 45 os << team_name (winner) << " won!\n"; 0 46 return winner; 47 } 48 49 int main(int argc, const char *argv[]) { Showing the top seven matches Last indexed 4 days ago Status Docs 0 0 1 C++ Security Contact GitHub Pricing API Training Blog About
YOU CAN SHARE CODE FOR THIS ASSIGNMENT IF AND ONLY IF YOUR CHESS PIECES ARE UNIQUE FROM EVERYONE ELSE'S AND YOU MAKE MORE THAN 1 TYPE OF PIECE! Add a white and black version of a new custom ChessPiece. You can create 2 types of pieces instead of only 1 for extra credit! They can move however you want as long as it works with the existing code. For example, your ChessPiece Can't keep track of any data because in the chess game, it will be const, like the other existing and "Black Snowman" but not "First Quarter Moon" and "Last Quarter It needs to be clear which piece is on which team. For the existing pieces, the white pieces are not very filled in while the black pieces are. For example, "Snowman" Moon" (or a and A.
Unicode Character "0" (U+2603) Snowman [¹] 1.1 (June 1993) [2] Miscellaneous Symbols, U+2600 - U+26FF[³] Basic Multilingual Plane, U+0000 - U+FFFF [3] Code for undetermined script (Zyyy) [4] Other Symbol (So) [1] Other Neutral (ON) Not Reordered (0) [1] No [1] ☃ ☃ OxE2 0x98 0x83 0x2603 0x00002603 Name: Unicode Version: Block: Plane: Script: Category: Bidirectional Class: Combining Class: Character is Mirrored: HTML Entity: UTF-8 Encoding: UTF-16 Encoding: UTF-32 Encoding:
66 22 Unicode Character " (U+26C7) Black Snowman [¹] 5.2 (October 2009) [2] Miscellaneous Symbols, U+2600 - U+26FF[3] Basic Multilingual Plane, U+0000 - U+FFFF [3] Code for undetermined script (Zyyy) [4] Other Symbol (So) [¹] Other Neutral (ON) [1] Not Reordered (0) [1] No [1] ⛇ ⛇ OxE2 0x9B 0x87 0x26C7 0x000026C7 Name: Unicode Version: Block: Plane: Script: Category: Bidirectional Class: Combining Class: Character is Mirrored: HTML Entity: UTF-8 Encoding: UTF-16 Encoding: UTF-32 Encoding:
Unicode Character "D" (U+263D) ) Name: Unicode Version: Block: Plane: Script: Category: Bidirectional Class: Combining Class: Character is Mirrored: HTML Entity: UTF-8 Encoding: UTF-16 Encoding: UTF-32 Encoding: First Quarter Moon [¹] 1.1 (June 1993) [2] Miscellaneous Symbols, U+2600 - U+26FF [³] Basic Multilingual Plane, U+0000 - U+FFFF [3] Code for undetermined script (Zyyy) [4] Other Symbol (So) [¹] Other Neutral (ON) Not Reordered (0) [1] No [1] ☽ ☽ OxE2 0x98 0XBD 0x263D 0x0000263D
Unicode Character "C" (U+263E) C Name: Unicode Version: Block: Plane: Script: Category: Bidirectional Class: Combining Class: Character is Mirrored: HTML Entity: UTF-8 Encoding: UTF-16 Encoding: UTF-32 Encoding: Last Quarter Moon [1] 1.1 (June 1993) [2] Miscellaneous Symbols, U+2600 - U+26FF[3] Basic Multilingual Plane, U+0000 - U+FFFF [³] Code for undetermined script (Zyyy) [4] Other Symbol (So) [¹] Other Neutral (ON) [¹] Not Reordered (0) No [1] ☾ ☾ 0xE2 0x98 0xBE 0x263E 0x0000263E
Number of Entries: Total Number of Characters: Table Key Name Control Format Private Use Surrrogate Lowercase Letter Modifier Letter Other Letter Titlecase Letter Uppercase Letter Spacing Mark Enclosing Mark Nonspacing Mark Decimal Number Letter Number Other Number Connector Punctuation Cc Cf Co Cs LI Lm Lo Lt 3 Unicode Character Categories [1] 29 143,924 Lu Mc Me Mn Nd NI No Characters 65 161 0 2,155 260 127,004 31 1,791 443 13 1,839 650 236 895 10
C++ Project: Silly Chess Part 1: Unit Tests Write unit tests for the existing code. This is probably the least fun but
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am