-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Xi (Matthew) Liu edited this page Oct 14, 2017
·
2 revisions
A customized version of Candy Crush in which 2 players compete remotely over the network in real time to reach user-designated explosion times.
- Application is implemented in C/C++, using multi-threading to enable real-time utilities and TCP Sockets to connect players through the network.
- Game board instances are stored in designed JSON format, facilitating game Saving and Reloading.
- The application can promptly detect any network connection failure of both players, terminating and saving the game in-time to preserve fairness.
P1 playing the game at timestamp a:
P2 playing the game at timestamp a:
P1 playing the game at timestamp b:
P2 playing the game at timestamp b:
GTK+ must be pre-installed on your computer.
- Clone the entire repo to your desktop (one for each player).
- run
$ make
in the root directory of the cloned repo.
- For P1, run
$ ./p1 [gameboard_file] [max_score]
in the directory, or$ ./p1
for the default 25_by_5 gameboard and default max_score of 20. - For P2, simply run
$ ./p2 [serverName_of_p1]
in the directory, as the gameboard and max_score is set by p1 and transported to p2 throught the network.