-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuery.cs
More file actions
132 lines (121 loc) · 4.71 KB
/
Query.cs
File metadata and controls
132 lines (121 loc) · 4.71 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
using System;
using System.IO;
using System.Net;
public class Query {
public async static void Adventure() {
string you = "You: "; // continuation of the game;
string XEpsilonX = "XEpsilonX *assistant of Mk.2* : ";
int XEpsilonXHP = 100;
int PlayerHP = 100;
bool Fight = true;
string Start = Console.ReadLine();
if(Start.Contains("DeadHit")) {
XEpsilonXHP = 0;
Console.WriteLine("Mk.2: You Won");
}
if(Start.Contains("Fight",StringComparison.OrdinalIgnoreCase)) {
Console.WriteLine(XEpsilonX + "AH!");
XEpsilonXHP = XEpsilonXHP - 30; // YOUR A MIGHTEST WARRIOR IMAGINE THAT;
Fight = true;
if(Start.Contains("Defend",StringComparison.OrdinalIgnoreCase)) {
Console.WriteLine(XEpsilonX + "ILL DEFEAT YOU!");
PlayerHP = PlayerHP - 28;
Fight = true;
} if(PlayerHP == 0 && XEpsilonXHP == 0) {
Console.WriteLine(XEpsilonX + "Its a Tie Mk.2 boss");
} else if(PlayerHP == 0) {
Fight = false;
Console.WriteLine(XEpsilonX + "I WON Mk.2 boss");
} else if(XEpsilonXHP == 0) {
Fight = false;
Console.WriteLine("Mk.2: Wow you won!");
}
}
}
public async static void GamePaper() {
bool screen = true;
while (screen) {
string[] keywords = {"Rock","Paper","Scissors"}; // rock paper scissors but the computer output is hidden
Random random = new Random();
string Output = keywords[random.Next(keywords.Length)];
string OutPut = keywords[random.Next(keywords.Length)];
Console.WriteLine("3..");
await Task.Delay(1000);
Console.WriteLine("Enter Your Choice");
string Choice = Console.ReadLine();
if(Choice.Contains("Paper",StringComparison.OrdinalIgnoreCase) && OutPut == "Scissors")
if(Choice.Contains("Rock",StringComparison.OrdinalIgnoreCase) && OutPut == "Paper") {
Console.WriteLine("You Lose");
Console.WriteLine("Computer Choice: " + Output);
Console.WriteLine("Play Again?");
if(Choice.Contains("Y",StringComparison.OrdinalIgnoreCase)) {
GamePaper();
} else if(Choice.Contains("N", StringComparison.OrdinalIgnoreCase)) {
screen = false;
}
}
if(Choice.Contains("Scissors",StringComparison.OrdinalIgnoreCase) && OutPut == "Paper") {
Console.WriteLine("You Won");
Console.WriteLine("PlayAgain?");
if(Choice.Contains("Y",StringComparison.OrdinalIgnoreCase)) {
GamePaper();
} else if(Choice.Contains("N", StringComparison.OrdinalIgnoreCase)) {
screen = false;
}
}
if(Choice.Contains("Paper") && OutPut == "Rock") {
Console.WriteLine("You Win");
Console.WriteLine("Play Again?");
if(Choice.Contains("Y",StringComparison.OrdinalIgnoreCase)) {
GamePaper();
} else if(Choice.Contains("N", StringComparison.OrdinalIgnoreCase)) {
screen = false;
}
} if(Choice.Contains("Rock",StringComparison.OrdinalIgnoreCase ) && OutPut == "Paper") {
Console.WriteLine("You Lost");
Console.WriteLine("Play Again? Y/N");
if(Choice.Contains("Y",StringComparison.OrdinalIgnoreCase)) {
GamePaper();
} else if(Choice.Contains("N", StringComparison.OrdinalIgnoreCase)) { // comparisons
screen = false;
}
}
}
}
public async static void CsCodeQuery() {
Console.WriteLine("Error"); // incomplete
}
public async static void NumberGuess() {
bool screen = true;
while(screen) {
Console.WriteLine("first number value");
int Value = Convert.ToInt32(Console.ReadLine());
int Values = Value;
Console.WriteLine("second number value");
int Value2 = Convert.ToInt32(Console.ReadLine());
int Valuess = Value2; // own value number guessing game
bool HasWon = false;
Random random = new Random();
int randomNumber = random.Next(Values, Valuess);
int guess = Convert.ToInt32(Console.ReadLine());
if(guess > randomNumber) {
Console.WriteLine("Too high");
} else if(guess < randomNumber) {
Console.WriteLine("Too low");
} else if(guess == randomNumber) {
HasWon = true;
Console.WriteLine("You won!");
Console.WriteLine("The Number is " + randomNumber);
await Task.Delay(1000);
Console.WriteLine("Want to play again?");
string input = Console.ReadLine();
if(input.Contains("Yes", StringComparison.OrdinalIgnoreCase)) {
NumberGuess();
} else if(input.Contains("No", StringComparison.OrdinalIgnoreCase)) {
Console.WriteLine("Okay");
Console.WriteLine("Quitting...to..Main");
}
}
}
}
}