Skip to content

Marcussyl/flying-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game name: Flying chess

Members: Po Yuen Fai 3035686102 Sze Yu Lam 3035782255

Game rules:

  1. The player will take turn to throw a dice and move to a location accordingly
  2. There are different TRICKS the player may encounter
  3. The game will be ended once winner is generated
  4. Maximum number of player is 4
  5. If the player reaches the same location with another player, another player will be killed and return to the initial point

Features implemented:

  1. 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.

  2. 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.

  3. 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

  4. 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

  5. Program codes in multiple files -The program is placed in separated files (function.cpp, function.h, main.cpp)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published