-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
47 lines (33 loc) · 1.24 KB
/
Program.cs
File metadata and controls
47 lines (33 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
namespace ChessBoard
{
/// <summary>
/// This program takes two user inputs, verifies that they are integers and prompts if not, and uses the numbers to
/// make a chess table with width of chess board and dimensions of each square.
/// </summary>
public class Program
{
static int squareSize = 0;
static int boardSize = 0;
public static void Main()
{
//do while loops make sure the program doesnt continue until the user enters valid integer inputs for both sizes
do
{
Console.WriteLine("Enter Square size: ");
string squareInput = Console.ReadLine();
Program.squareSize = InputTester.TestInput(squareInput);
} while (squareSize == 0);
do
{
Console.WriteLine("Enter Board size: ");
string boardInput = Console.ReadLine();
Program.boardSize = InputTester.TestInput(boardInput);
} while (boardSize == 0);
ChessBoardMaker board = new ChessBoardMaker();
board.GetBoard(squareSize, boardSize);
Console.ReadLine();
}
}
}