public override void SetName(int PlayerNumber, PlayerImplementation Opponent)
 {
     if (Opponent is HumanPlayer)
         Name = string.Format("Player {0}", PlayerNumber);
     else
         Name = string.Format("You", PlayerNumber);
 }
Exemplo n.º 2
0
        public Game(PlayerImplementation PlayerA, PlayerImplementation PlayerB, bool Output = false, int Seed = -1)
        {
            this.Output = Output;

            // Store the players
            this.PlayerA = PlayerA;
            this.PlayerB = PlayerB;
            PlayerA.MyGame = PlayerB.MyGame = this;

            // Set the names of the players
            PlayerA.SetName(1, PlayerB);
            PlayerB.SetName(2, PlayerA);

            Cards = new int[9];

            if (Seed >= 0)
                Rnd = new Random(Seed);
            else
                Rnd = new Random();
        }
Exemplo n.º 3
0
 void SwapPlayers()
 {
     PlayerImplementation Hold = PlayerA;
     PlayerA = PlayerB;
     PlayerB = Hold;
 }
 public virtual void SetName(int PlayerNumber, PlayerImplementation Opponent)
 {
     Name = string.Format("Player {0}", PlayerNumber);
 }