private static void Main() { SysLogger.DisplayMessageToTheConsole("WelcomeToTheGame"); if (Field.CreateField() == null) { return; } while (Field.IsMoreMovesPossible()) { Field.DrawField(); var move = Move.PromptForNextMove(); if (Move.IsPlayerGivingUp(move)) { return; } if (Move.IsPlayerInputValid(move)) { if (Field.IsCellFree(move)) { Field.UpdateCellState(move); if (Field.IsThereWinner()) { return; } Player.UpdateCurrentPlayerNumber(); } } } }
public static bool IsFieldSizeValid(string userSizeInput) { if (userSizeInput == "3") { return(true); } SysLogger.DisplayMessageToTheConsole("InvalidFieldSize"); return(false); }