コード例 #1
0
        public void AddPlayers(string namePlayer1, string surnamePlayer1, string namePlayer2, string surnamePlayer2)
        {
            databasePlayers = new DatabasePlayers();
            game            = new Game();

            game.AddPlayers(namePlayer1, surnamePlayer1, namePlayer2, surnamePlayer2, databasePlayers);
        }
コード例 #2
0
        public void AddPlayers(string namePlayer1, string surnamePlayer1, string namePlayer2, string surnamePlayer2, DatabasePlayers databasePlayers)
        {
            Player firstPlayer = new Player(namePlayer1, surnamePlayer1);

            databasePlayers.player1 = firstPlayer;

            Player secondPlayer = new Player(namePlayer2, surnamePlayer2);

            databasePlayers.player2 = secondPlayer;

            this.databasePlayers = databasePlayers;
        }