Watopoly is among many choices of topic to choose for the final project of CS246. It is the monopoly game style with the modification of building/environment/gameplay of the University of Waterloo campus. This project is contributed by Trung Nguyen, William Wang and Catherine Wang. Thanks guys for your hard working.
Note: For UWaterloo CS246 students, please do not use this code for your final project, which would be detected by the university plagiarism checking system. This repository is used only to show for who is not in the course and for people to play the game.
Please make sure you can compile C++ on your local machine beforehand
- Clone the current repo
$ git clone https://github.com/chinhtrung/watopoly.git
- Run
make
file$ make
- Start the game
$ ./watopoly
- Follow the commands from terminal to play 🎲🤑
The components are shared to build between teamate and are subject to change as the first plan of attack. We also breakdown the whole project relative classes/components with their relationship into the UML model diagram
The completed plan of attack this problem can be found HERE and the UML model is HERE
Here we want to be consistent in naming each code components for the sake of readability and debugging activity
The parameters name, including variables and methods, should be in camelCase except for ID keywords (which is in allcaps)
std::string gameName;
char gamePiece;
int ID;
int getID();
int die1 = 6;
int rollDice()
The class name should be in UpperCamelCase
class Square{
Square();
};
class GameState{
GameState();
};
The file name should be in camelCase
gameState.h
gameState.cc
player.h
player.cc
main.cc
Followed by the convention of CS246 course note, please note that DO NOT USE using namespace std;
in the .h
files to minimize the chance of conflict due to implicit interpretation
#ifndef GAMESTATE_H
#define GAMESTATE_H
...
#endif
- To set up to track remote branch for reference without merging to your current branch
git branch -f <local_branch> origin/<remote_branch>
- To check all active branches in remote repository
git ls-remote origin
- To update the existence of a branch when you just created a new branch in remote repository
git fetch origin <remote_branch>