public void GameOver(int yourPossition) { // Notify user of his achievements // Update statistics // Destry the table after game ends this.GameTable = null; }
public void HostGame() { //Creates table with ID (which will be used as token to join) if(GameTable == null) { this.GameTable = new Table(); int playerID = GameTable.myPlayer.ID; proxy.HostGame(GameTable.TableID, playerID); } }
public void JoinGame(int token) { //Joins table with specified token //Creates local table if (GameTable == null) { this.GameTable = new Table(token); int playerID = GameTable.myPlayer.ID; if (proxy.JoinGame(token, playerID) != Errors.NONE) this.GameTable = null; } }
/// <summary> /// Starts game against random player /// </summary> public void Play() { if (GameTable == null) { this.GameTable = new Table(); int playerID = GameTable.myPlayer.ID; proxy.PlayRandom(playerID); } }