-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
44 lines (33 loc) · 1.28 KB
/
Program.cs
File metadata and controls
44 lines (33 loc) · 1.28 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
using MyFirstProgram.UI;
//
// Requirements:
//
// 1. You need to create a Math game containing the 4 basic operations
// 2. The divisions should result on INTEGERS ONLY and dividends should go from 0 to 100. Example: Your app shouldn't present the division 7/2 to the user, since it doesn't result in an integer.
// 3. Users should be presented with a menu to choose an operation
// 4. You should record previous games in a List and there should be an option in the menu for the user to visualize a history of previous games.
// 5. You don't need to record results on a database. Once the program is closed the results will be deleted.
//
Console.Clear();
Console.WriteLine("-------------------------------------------------------------------");
Console.WriteLine("Welcome New User to the Math Game!");
Console.WriteLine("-------------------------------------------------------------------\n");
//
// Simple Login/Authorization
//
Console.Write("Please enter your name to begin: ");
string? userName = Console.ReadLine();
if (string.IsNullOrEmpty(userName))
{
Console.WriteLine("You must enter a name to play!");
Environment.Exit(-1);;
}
//
// Main Dialog loop
//
var UserInterface = new UI();
UserInterface.ShowMainDialog(userName);
//
// End of Programme
//
Environment.Exit(0);