static void Main() { //BoardView.Show(); //BoardModel boardLogic = new BoardModel(); //boardLogic.ModelLogic(); var boardModel = new BoardModel(); while (true) { GameLogic test = new GameLogic(); BoardView.Show(boardModel); test.CheckVictoryCondition(boardModel); Console.Write("Type where you want to place X (e.g \"a2\"): "); var position = Console.ReadLine(); boardModel.SetCross(position); if (CheckWinner(boardModel)) { break; } Thread.Sleep(2000); boardModel.SetRandomCircle(); if (CheckWinner(boardModel)) { break; } } RestartProgram(); }
static void Main(string[] args) { var boardModel = new BoardModel(); while (true) { BoardView.Show(boardModel); Console.Write("Skriv inn hvor du vil sette kryss (f.eks. \"a2\"): "); var position = Console.ReadLine(); boardModel.SetCross(position); BoardView.Show(boardModel); Thread.Sleep(2000); boardModel.SetRandomCircle(); } }