| |
|
The goal of this project is to develop a desktop application that allows users to play the online version of “Cabo”, a turn-based card game. Details about the game itself and how it works can be found in the report. The application runs on PC and provides a GUI to allow user interaction in every step of the system, from creating or joining a game, to the single actions performed during a turn. Games can be private or public: in the first case, other players can join only by using a unique code; in the second case, the game is shared through a lobby server and becomes visible to all players in the system. The server does not work as a dispatcher of messages between players; it is only used to obtain a reference to the host to start the communication. Therefore, the application is structured as a peer-to-peer (P2P) system, meaning that the players participating in a game are connected directly to each other. Without a centralized server, it is necessary that the information and data shared between players are always consistent and up to date. In particular, during a match, the game state (which includes the players’ hands and the table situation) must always be the same for every player at every turn, to ensure that the actions chosen by a player are coherent and correct with respect to the current situation.