-
Notifications
You must be signed in to change notification settings - Fork 1
Game Model
This is the central model class which consists of the actual game state.This class does most of the game logic such as the generation of the tiles, generation of tile values and movement of tiles.This class also handles updating of the values that correspond to the different instance variables and views.
- Tiles: Holds all the tiles on the game board
- PlaceTiles: Generates all the tiles to be placed on the game board.
- Shiftiles: Shifts the tiles to what ever direction specified by player input and updates the model.
- Save: Pauses the game and saves the current game state.
- Load: Retrieves the saved game state and Loads it again.
This is a child to the Game class. This class changes the game state in to a cheat mode by allowing user to directly manupulate certain input such as the value of the tiles which is not acceptable in the acctual game.
- ActivateCheatMode: Puts the game in a cheat mode and activates some aspects of the views on the game boad. i.e The tiles allow a player to directly type in a value.
- DeactivateCheatMode: Reverts the game to the normal mode.
This class manupulates the attributes of the tiles that are on the game board such as their color and their value.
- GetColor: Picks and assigns a color to a tile on the board.
This class handles all of the server side networked game scenarios. The class is in charge of waiting for any client that may be wanting to play the game online and handles the clients requests accordingly.
- Port: Dedicates a port to this server communication.
- TcpListener: Recieves all communication from the clients. Several clients can connect at the same time and this server class should be able to handle all of the clients independently and handle race.
- WaitForClient: Waits for a client to connect and creates a client instance.
- Handle client: Handles client requests and sends feedback to client.