Game name: Flying chess
Members: Po Yuen Fai 3035686102 Sze Yu Lam 3035782255
Game rules:
- The player will take turn to throw a dice and move to a location accordingly
- There are different TRICKS the player may encounter
- The game will be ended once winner is generated
- Maximum number of player is 4
- If the player reaches the same location with another player, another player will be killed and return to the initial point
Features implemented:
-
Generation of random game sets or events -Every dice is randomly thrown (dice 1-6) -Produce 4 random trap in the map when game starts -If the player reaches certain trap position, the player will transfer to a random coordinate.
-
Data structures for storing game status -creating a struct named Player, which stores the name, symbol, initial position and current postion of the player. -using an array named "board" to store the player's position and show the position to users more intuitively.
-
Dynamic memory management -In player_info function, the player information is stored in a dynamic array, -this can handle the problem that the number of players is not determined when the game starts
-
File input/output (e.g., for loading/saving game status) -In isWinner function, the winner of each round of the game is stored in a external file called "winner.txt", -the winner information will be appended to the file instead of replacing the existing information
-
Program codes in multiple files -The program is placed in separated files (function.cpp, function.h, main.cpp)