private void PrintBoard(Board board) { string renderedBoard = boardRenderer.Render(board); io.Clear(); io.WriteLine(renderedBoard); }
public virtual int Read() { while (true) { io.Clear(); string candidateSize = io.Read("Please enter board size. The size must be a natural number bigger then 0"); if (!string.IsNullOrEmpty(candidateSize) && int.TryParse(candidateSize, out int size) && size > 0) { return(size); } else { io.Read($"{candidateSize} is not a valid board size! Press Enter to continue."); } } }
private void Welcome() { io.Clear(); io.WriteLine("Welcome to the MagicSquare!", 1000); }