-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (36 loc) · 791 Bytes
/
Program.cs
File metadata and controls
38 lines (36 loc) · 791 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace MinesweeperSolver
{
class Program
{
static void Main(string[] args)
{
int w = 8;
int h = 8;
int bombs = 10;
Console.WriteLine("Ready?");
Console.ReadKey();
Board board = new XBoard(w, h);
AI ai = new AI(w, h, bombs, board, true);
bool c = false;
do
{
while (ai.NextMove())
{
}
Console.WriteLine("AI is done, if you want to run again press y");
c = Console.ReadKey().Key == ConsoleKey.Y;
if (c)
{
ai = new AI(w, h, bombs, board, true);
board.Retry();
}
} while (c);
}
}
}