Example #1
0
        public static void main()
        {
            player    = new TttNums[2];
            player[0] = new TttNums("Toto");
            player[1] = new TttNums("Molly");

            int who = 1;          //player numbers are 1 and 0

            board = new bool[10]; //only 1-9 are used

            for (int k = 0; k < 9 && player[0].isTrying() && player[1].isTrying(); k++)
            {
                player[who].move();
                printBoard();
                who = 1 - who;    //now it’s the other player’s turn
            } //for
        } //main
Example #2
0
 public static void Main(string[] args)
 {
     Console.WriteLine("** Game Starting");
     TttNums.main();
     Console.WriteLine("** Game Ended");
 }