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(); }
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"); }
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"); }
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; } }
private void DoActionFor1() { ticTacToe = new TicTacToe(); //Får spillebrættet frem }
private void DoActionFor1() { ticTacToe = new TicTacToe(); }
private void DoActionFor1() //Opret nyt spil og slet det gamle. { ticTacToe = new TicTacToe(); }
private void DoActionStartNormalGame() { ticTacToe = new TicTacToe(); ticTacToe.isVariation = false; ticTacToe.AddPlayers(); }
private void DoActionStartVariationGame() { ticTacToe = new TicTacToe(); ticTacToe.isVariation = true; ticTacToe.AddPlayers(); }
private void DoActionFor1()// starter et spil { ticTacToe = new TicTacToe(); }
private void ExecuteMenuChoice1() { ticTacToe = new TicTacToe(); { } }
private void DoActionFor4() { Console.WriteLine("Du har startet et variations spil"); ticTacToe = new TicTacToeVariant(); }