예제 #1
0
        private void DoActionFor1() //Skal erstattes. Skal referere til game boarded.
        {
            Console.Clear();
            Console.WriteLine("Vælg mellem at spille standard eller variation");
            Console.WriteLine("Tast 1 for standard. Tast 2 for variation");
            //Console.ReadLine();
            string choiceOfGame = "";

            choiceOfGame = GetUserChoise();
            switch (choiceOfGame)
            {
            case "1": ticTacToe = new TicTacToe(); break;

            case "2": ticTacToe = new TicTacToe(); Variation(); break;

                // case "øverst venstre": ticTacToe.GameBoard[0, 2] = 'x'; break;
            }

            //ticTacToe = new TicTacToe();
        }
예제 #2
0
 public void ShowMenu()
 {
     Console.Clear();
     if (ticTacToe != null)
     {
         Console.WriteLine(ticTacToe.GetGameBoardView());
         if (TicTacToe.Validate(ticTacToe.GameBoard) != ' ')                         //Hvis metoden Validate registrerer 3 på stribe ud fra koden i TicTacToe.cs - så afsluttes spillet(running = false) og nedenstående strings printes
         {
             Console.WriteLine("player " + TicTacToe.Validate(ticTacToe.GameBoard)); //Sidste del er for at finde ud af om det er spilleren X eller O.
             Console.WriteLine("A Winner is You!");
             running = false;                                                        //her afsluttes spillet.
         }
     }
     Console.WriteLine("tic tac toe");
     Console.WriteLine();
     Console.WriteLine("1. Opret et nyt spil");
     Console.WriteLine("2. Set en brik");
     Console.WriteLine("3. Flyt en brik");
     Console.WriteLine();
     Console.WriteLine("0. exit");
 }
예제 #3
0
 public void ShowMenu()
 {
     Console.Clear();
     if (ticTacToe != null)
     {
         Console.WriteLine(ticTacToe.GetGameBoardView());
         if (TicTacToe.Validate(ticTacToe.GameBoard) != ' ')
         {
             Console.WriteLine("player " + TicTacToe.Validate(ticTacToe.GameBoard));
             Console.WriteLine("A Winner is You!");
             running = false;
         }
     }
     Console.WriteLine("tic tac toe");
     Console.WriteLine();
     Console.WriteLine("1. Opret et nyt almindeligt spil");
     Console.WriteLine("2. Set en brik");
     Console.WriteLine("3. Flyt en brik");
     Console.WriteLine("4. Opret et nyt variations Spil");
     Console.WriteLine();
     Console.WriteLine("0. exit");
 }
예제 #4
0
        private void DoActionFor1()
        {
            Console.Clear();
            Console.WriteLine("Which gamemode would you like to play?");
            Console.WriteLine();
            Console.WriteLine("Type 1 For standard");
            Console.WriteLine("Type 2 For Variation, with a max of 3 bricks");
            Console.WriteLine();

            switch (Console.ReadLine())
            {
            case "1":
                ticTacToe   = new TicTacToe();
                currentgame = true;
                player1     = true;
                variation   = false;
                Console.WriteLine("You chose standard");
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
                break;

            case "2":
                ticTacToe   = new TicTacToe();
                currentgame = true;
                player1     = true;
                variation   = true;
                brickcount  = 0;
                Console.WriteLine("You chose variation");
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
                break;

            default:
                ShowMenuSelectionError();
                break;
            }
        }
예제 #5
0
 private void DoActionFor1()
 {
     ticTacToe = new TicTacToe(); //Får spillebrættet frem
 }
예제 #6
0
파일: TicTacToeMenu.cs 프로젝트: QTPx/spil
 private void DoActionFor1()
 {
     ticTacToe = new TicTacToe();
 }
예제 #7
0
 private void DoActionFor1() //Opret nyt spil og slet det gamle.
 {
     ticTacToe = new TicTacToe();
 }
예제 #8
0
 private void DoActionStartNormalGame()
 {
     ticTacToe             = new TicTacToe();
     ticTacToe.isVariation = false;
     ticTacToe.AddPlayers();
 }
예제 #9
0
 private void DoActionStartVariationGame()
 {
     ticTacToe             = new TicTacToe();
     ticTacToe.isVariation = true;
     ticTacToe.AddPlayers();
 }
예제 #10
0
 private void DoActionFor1()// starter et spil
 {
     ticTacToe = new TicTacToe();
 }
예제 #11
0
파일: TicTacToeMenu.cs 프로젝트: QTPx/spil
 private void ExecuteMenuChoice1()
 {
     ticTacToe = new TicTacToe();
     {
     }
 }
예제 #12
0
 private void DoActionFor4()
 {
     Console.WriteLine("Du har startet et variations spil");
     ticTacToe = new TicTacToeVariant();
 }