Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
95 lines (87 loc) · 3.31 KB
/
Copy pathProgram.cs
File metadata and controls
95 lines (87 loc) · 3.31 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace DieGame2
{
internal class Program
{
static void Main(string[] args)
{
int playerChoice;
SevenOut sevenOut = new SevenOut();
ThreeOrMore threeOrMore = new ThreeOrMore();
while (true)
{
Console.WriteLine("\n");
Console.WriteLine("WELCOME TO DICE GAME PROGRAM.");
Console.WriteLine("Please Press A Number (1-5).");
Console.WriteLine("1. Play Seven Out Game.");
Console.WriteLine("2. Play Three Or More Game.");
Console.WriteLine("3. View Statistics of Seven Out Game.");
Console.WriteLine("4. View Statistics of Three Or More Game.");
Console.WriteLine("5. Exit.");
while (true)
{
try
{
playerChoice = int.Parse(Console.ReadLine());
if (playerChoice == 1 || playerChoice == 2 || playerChoice == 3 || playerChoice == 4 || playerChoice == 5)
{
break;
}
else
{
Console.WriteLine("Please Input 1 to 4 Integer Only.");
continue;
}
}
catch
{
Console.WriteLine("Please Input 1 to 4 Integer Only.");
continue;
}
}
if (playerChoice == 1)
{
sevenOut.Control();
Console.WriteLine("\n");
Console.WriteLine("What Would You Like To Do Next? Please Input An Input.");
continue;
}
else if (playerChoice == 2)
{
threeOrMore.Control();
Console.WriteLine("\n");
Console.WriteLine("What Would You Like To Do Next? Please Input An Input.");
continue;
}
else if (playerChoice == 3)
{
sevenOut.GetStatistic.ReportTimes();
sevenOut.GetStatistic.ReportPoints();
sevenOut.GetStatistic.ReportWinners();
Console.WriteLine("\n");
Console.WriteLine("What Would You Like To Do Next? Please Input An Input.");
continue;
}
else if (playerChoice == 4)
{
threeOrMore.GetStatistics.ReportTimes();
threeOrMore.GetStatistics.ReportPoints();
threeOrMore.GetStatistics.ReportWinners();
Console.WriteLine("\n");
Console.WriteLine("What Would You Like To Do Next? Please Input An Input.");
continue;
}
else if (playerChoice == 5)
{
Console.WriteLine("The Program Exits.");
break;
}
}
}
}
}