Esempio n. 1
0
        public Player assignColor(Player p1, Player p2)
        {
            Random rnd = new Random();
            int    n   = rnd.Next(0, 2);

            if (n == 0)
            {
                p1.setColor(Color.Black);
                p2.setColor(Color.White);
                return(p1);
            }
            else
            {
                p1.setColor(Color.White);
                p2.setColor(Color.Black);
                return(p2);
            }
        }//method