-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
56 lines (46 loc) · 1.43 KB
/
Program.cs
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
48
49
50
51
52
53
54
55
56
using System.Linq;
using System;
using System.Collections.Generic;
namespace minesweeper
{
class Program
{
const int BOARD_SIZE = 14;
const int MINE_COUNT = 1;
const bool DEBUG = true;
static void Main(string[] args)
{
// Grid with navigation
// Set Flag
// Reveal
//
string difficulty = "";
while(true)
{
Intro();
string command = Console.ReadLine();
if(command.ToLower() == "exit") {
break;
}
switch(command)
{
case "play":
Board board = new Board(difficulty);
board.Play();
break;
case "difficulty":
Console.Clear();
Console.WriteLine("Choose a difficulty:");
Console.WriteLine("EASY, MEDIUM, HARD");
difficulty = Console.ReadLine().ToUpper();
break;
}
}
}
static void Intro() {
Console.Clear();
Console.WriteLine("MINESWEEPER");
Console.WriteLine("Type 'play', 'difficulty', or 'exit'");
}
}
}