public Game(int gameid, Player player1, Player player2) { this.gameid = gameid; this.player1 = player1; this.player2 = player2; //Making a player start random. int playerstart = new Random().Next(1, 3); if (playerstart == 1) { this.playertoplay = this.player1; } else { this.playertoplay = this.player2; } }
public void createNewUser(string name,string psw) { Player playerP = new Player(name, psw); addPlyer(playerP); }
public void addPlyer(Player player) { onlinePlayers.Add(player); }