static void Main(string[] args) { ConsoleColor pink = Console.ForegroundColor; Console.SetCursorPosition(14, 2); Console.ForegroundColor = ConsoleColor.DarkCyan; Console.WriteLine("Welcome to Tic Tac Toe"); var ticTacToe = new TicTacToe(); ticTacToe.Run(); }
public void Run() { var Tic = new TicTacToe(); while (!Tic) ; if(boardPositions(0)== 'X') // FOR ILLUSTRATION CHANGE TO YOUR OWN LOGIC TO DO TIC TAC TOE Console.SetCursorPosition(2, 19); Console.Write("Player O"); Console.SetCursorPosition(2, 20); Console.Write("Please Enter Row: "); var row = Console.ReadLine(); Console.SetCursorPosition(2, 22); Console.Write("Please Enter Column: "); var column = Console.ReadLine(); // THIS JUST DRAWS THE BOARD (NO TIC TAC TOE LOGIC) _boardRenderer.AddMove(int.Parse(row), int.Parse(column), PlayerEnum.O, true); Console.SetCursorPosition(2, 19); Console.Write("Player X"); Console.SetCursorPosition(2, 20); Console.Write("Please Enter Row: "); row = Console.ReadLine(); Console.SetCursorPosition(2, 22); Console.Write("Please Enter Column: "); column = Console.ReadLine(); // THIS JUST DRAWS THE BOARD (NO TIC TAC TOE LOGIC) _boardRenderer.AddMove(int.Parse(row), int.Parse(column), PlayerEnum.X, true); }
static void Main(string[] args) { ConsoleColor oldColor = Console.ForegroundColor; Console.SetCursorPosition(10, 2); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("Welcome to Tic Tac Toe"); var ticTacToe = new TicTacToe(); Console.ForegroundColor = oldColor; Console.SetCursorPosition(20, 25); Console.WriteLine("Thank you for playing"); Console.ReadLine(); }
static void Main(string[] args) { ConsoleColor oldColor = Console.ForegroundColor; Console.SetCursorPosition(10, 2); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("Let You Play :-) Don't Be Rude Ok"); var ticTacToe = new TicTacToe(); ticTacToe.RunX(); ticTacToe.RunO(); Console.ForegroundColor = ConsoleColor.Cyan; Console.SetCursorPosition(20, 25); Console.ReadLine(); }
static void Main(string[] args) { ConsoleColor oldColour = Console.ForegroundColor; Console.SetCursorPosition(50, 2); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("GameXO"); var ticTacToe = new TicTacToe(); ticTacToe.Run(); ticTacToe.Run(); ticTacToe.Run(); ticTacToe.Run(); ticTacToe.Run(); ticTacToe.Run(); Console.SetCursorPosition(20, 25); Console.ForegroundColor = oldColour; Console.WriteLine("Thank you for playing The winner Is Obvious enough"); Console.ReadLine(); }
static void Main(string[] args) { ConsoleColor oldColor = Console.ForegroundColor; Console.SetCursorPosition(10, 2); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("WELKOME TO MORTAL KOMBAT \"T1C T4C T03\" "); Console.SetCursorPosition(1, 4); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("COLUMN: | | | |"); Console.SetCursorPosition(1, 5); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("________| 0 | 1 | 2 |"); Console.SetCursorPosition(1, 6); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write(" |"); Console.SetCursorPosition(1, 7); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("ROW: 0 |"); Console.SetCursorPosition(1, 8); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("________|"); Console.SetCursorPosition(1, 9); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write(" |"); Console.SetCursorPosition(1, 10); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("ROW: 1 |"); Console.SetCursorPosition(1, 11); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("________|"); Console.SetCursorPosition(1, 12); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write(" |"); Console.SetCursorPosition(1, 13); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("ROW: 2 |"); Console.SetCursorPosition(1, 14); Console.ForegroundColor = ConsoleColor.Cyan; Console.Write("________|"); var ticTacToe = new TicTacToe(); ticTacToe.CharacterOne(); ticTacToe.CharacterTwo(); ticTacToe.CharacterOne(); ticTacToe.CharacterTwo(); ticTacToe.CharacterOne(); ticTacToe.CharacterTwo(); ticTacToe.CharacterOne(); ticTacToe.CharacterTwo(); ticTacToe.CharacterOne(); ticTacToe.CheckWinCoordinates(); Console.ForegroundColor = oldColor; Console.SetCursorPosition(20, 30); Console.WriteLine("MORTAL KOMBAT \"T1C T4C TO3\" TOURNAMENT HAS ENDED"); Console.ReadLine(); }