blikk info infothek forum galerie sitemap

Tic Tac Toe Teil 3.

zur Aufgabenstellung

                else if (cpuzug == 4)

                {

                    if (a2 != 'x')

                    {

                        a2 = 'o';

                    }

                }

                else if (cpuzug == 5)

                {

                    if (b2 != 'x')

                    {

                        b2 = 'o';

                    }

                }

                else if (cpuzug == 6)

                {

                    if (c2 != 'x')

                    {

                        c2 = 'o';

                    }

                }

                else if (cpuzug == 7)

                {

                    if (a3 != 'x')

                    {

                        a3 = 'o';

                    }

                }

                else if (cpuzug == 8)

                {

                    if (b3 != 'x')

                    {

                        b3 = 'o';

                    }

                }

                else if (cpuzug == 9)

                {

                    if (c3 != 'x')

                    {

                        c3 = 'o';

                    }

                }

 

               

                Console.WriteLine(" " + a1 + " | " + b1 + " | " + c1 + " ");

                Console.WriteLine("-----------");

                Console.WriteLine(" " + a2 + " | " + b2 + " | " + c2 + " ");

                Console.WriteLine("-----------");

                Console.WriteLine(" " + a3 + " | " + b3 + " | " + c3 + " ");

                Console.Clear();

            }

 

            Console.Read();

 

        }

    }

}

 

 

Game created by Klemens aka Klumpi

PS: Wundert euch nicht über falsche Formatierung, sämtliche Backslash sind aus dem Programm gelöscht worden!

nach oben
punkt   seitenbereich schließen

Links

 

Aufgabenstellung
Teil 1.
Teil 2.