-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (33 loc) · 891 Bytes
/
Copy pathProgram.cs
File metadata and controls
38 lines (33 loc) · 891 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;
class Program
{
static void Main()
{
while (true)
{
ShowMenu();
var key = Console.ReadKey(true).Key;
if (key == ConsoleKey.Enter)
{
Game game = new Game();
game.Run();
}
else if (key == ConsoleKey.Escape)
{
break;
}
}
}
static void ShowMenu()
{
Console.Clear();
Console.WriteLine("================================");
Console.WriteLine(" SNAKE GAME ");
Console.WriteLine("================================");
Console.WriteLine();
Console.WriteLine(" ENTER -> Jugar");
Console.WriteLine(" ESC -> Salir");
Console.WriteLine();
Console.WriteLine("================================");
}
}