示例#1
0
        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;
            }
        }
示例#2
0
 public void createNewUser(string name,string psw)
 {
     Player playerP = new Player(name, psw);
     addPlyer(playerP);
 }
示例#3
0
 public void addPlyer(Player player)
 {
     onlinePlayers.Add(player);
 }