Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace RussianRoulette1
- {
- class Program
- {
- static void Main(string[] args){
- String UserChoice = "", Move = "", Strategy = "";
- int Chamber1 = 0;
- int Chamber2 = 0;
- int Chamber3 = 0;
- int Chamber4 = 0;
- int Chamber5 = 0;
- int Chamber6 = 0;
- Random ai = new Random();
- int AI, AI2;
- int Health = 1;
- int survives = 0;
- int luck;
- int sentence;
- int pl1 = 0;
- int pl2 = 0;
- int pl1s = 0;
- int pl2s = 0;
- Boolean playing = true, start = false, Action = false, exit = false;
- while (playing == true){
- Chamber1 = 0;
- Chamber2 = 0;
- Chamber3 = 0;
- Chamber4 = 0;
- Chamber5 = 0;
- Chamber6 = 0;
- UserChoice = "";
- Move = "";
- Action = false;
- start = false;
- if (Health == 1) {
- AI = ai.Next(1, 6);
- while (start == false) {
- Console.WriteLine("\nPLAYER1. \nThere are 6 chambers. \nHow many do you want to fill with bullets? \nThe oppurtunities are:\n1, 2, 3, 4, 5 \n----SCORE---- \nPLAYER1 WINS: {0} SURVIVES: {1} \nPLAYER2 WINS: {2} SURVIVES: {3}", pl1, pl1s, pl2, pl2s);
- Console.WriteLine("");
- Move = (Console.ReadLine());
- Move.ToLower();
- switch (Move){
- case "1":
- Chamber1 = 1;
- Console.WriteLine("\nYou are putting a bullet in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nYou have put 1 bullet in the chambers.");
- start = true;
- break;
- case "2":
- Chamber1 = 1;
- Chamber2 = 1;
- Console.WriteLine("\nYou are putting 2 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nYou have put 2 bullets in the chambers.");
- start = true;
- break;
- case "3":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Console.WriteLine("\nYou are putting 3 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nYou have put 3 bullets in the chambers.");
- start = true;
- break;
- case "4":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Chamber4 = 1;
- Console.WriteLine("\nYou are putting 4 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nYou have put 4 bullets in the chambers.");
- start = true;
- break;
- case "5":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Chamber4 = 1;
- Chamber5 = 1;
- Console.WriteLine("\nYou are putting 5 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nYou have put 5 bullets in the chambers.");
- start = true;
- break;
- default:
- Console.WriteLine("\nThis is not a oppertunity?");
- break;
- }
- }
- while (Action == false) {
- Console.WriteLine("\nThere are 2 oppertunities now. \nTry your luck or return to the start of the game.\nTo try your luck type: try \nTo return to the start of the game type: return");
- UserChoice = (Console.ReadLine());
- UserChoice.ToLower();
- switch (UserChoice) {
- case "return":
- Action = true;
- continue;
- case "try":
- Console.WriteLine("\nYou pulled the tricker.");
- Action = true;
- break;
- default:
- Console.WriteLine("\nWhat do you want to do? ,{0}, is not a oppertunity", UserChoice);
- break;
- }
- }
- if (AI == 1 && Chamber1 == 1 || AI == 2 && Chamber2 == 1 || AI == 3 && Chamber3 == 1 || AI == 4 && Chamber4 == 1 || AI == 5 && Chamber5 == 1 || AI == 6 && Chamber6 == 1){
- luck = ai.Next(1,30);
- if (luck == 30)
- {
- System.Threading.Thread.Sleep(2000);
- Console.WriteLine("\nPff PLAYER1 got lucky there was a bullet in the chamber.\nBut the gun was made in China so the tricker broke.");
- survives = survives + 1;
- continue;
- }
- else if (luck < 30) {
- System.Threading.Thread.Sleep(2000);
- sentence = ai.Next(1, 4);
- if (sentence == 1){
- Console.WriteLine("\nThe bullet crushed the skull from Player1.");
- }else if (sentence == 2){
- Console.WriteLine("\nThe bullet kiled also someone behind PLAYER1.");
- }else if (sentence == 3){
- Console.WriteLine("\nPLAYER1 killed his self silly sod.");
- }else if (sentence == 4) {
- Console.WriteLine("\nWhen the bullet hits the brain of PLAYER1, PLAYER1'S brain exploded.");
- }
- Console.WriteLine("\nPLAYER1 DIED, PLAYER2 WINS");
- pl2 = pl2 + 1;
- }
- }
- if (AI == 1 && Chamber1 == 0 || AI == 2 && Chamber2 == 0 || AI == 3 && Chamber3 == 0 || AI == 4 && Chamber4 == 0 || AI == 5 && Chamber5 == 0 || AI == 6 && Chamber6 == 0) {
- System.Threading.Thread.Sleep(2000);
- Console.WriteLine("\nPff you got lucky.");
- pl1s = pl1s + 1;
- }
- luck = 0;
- Chamber1 = 0;
- Chamber2 = 0;
- Chamber3 = 0;
- Chamber4 = 0;
- Chamber5 = 0;
- Chamber6 = 0;
- sentence = 0;
- UserChoice = "";
- Move = "";
- Action = false;
- start = false;
- AI2 = ai.Next(1, 6);
- while (start == false)
- {
- Console.WriteLine("\nPLAYER2. \nThere are 6 chambers. \nHow many do you want to fill with bullets? \nThe oppurtunities are:\n1, 2, 3, 4, 5 \n----SCORE---- \nPLAYER1 WINS: {0} SURVIVES: {1} \nPLAYER2 WINS: {2} SURVIVES: {3}", pl1, pl1s, pl2, pl2s);
- Console.WriteLine("");
- Move = (Console.ReadLine());
- Move.ToLower();
- switch (Move)
- {
- case "1":
- Chamber1 = 1;
- Console.WriteLine("\nPLAYER2 is putting a bullet in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nPLAYER2 has put 1 bullet in the chambers.");
- start = true;
- break;
- case "2":
- Chamber1 = 1;
- Chamber2 = 1;
- Console.WriteLine("\nPLAYER2 is putting 2 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nPLAYER2 has put 2 bullets in the chambers.");
- start = true;
- break;
- case "3":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Console.WriteLine("\nPLAYER2 is putting 3 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nPLAYER2 has put 3 bullets in the chambers.");
- start = true;
- break;
- case "4":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Chamber4 = 1;
- Console.WriteLine("\nPLAYER2 is putting 4 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nPLAYER2 has put 4 bullets in the chambers.");
- start = true;
- break;
- case "5":
- Chamber1 = 1;
- Chamber2 = 1;
- Chamber3 = 1;
- Chamber4 = 1;
- Chamber5 = 1;
- Console.WriteLine("\nPLAYER2 is putting 5 bullets in the chambers.");
- System.Threading.Thread.Sleep(5000);
- Console.WriteLine("\nPLAYER2 has put 5 bullets in the chambers.");
- start = true;
- break;
- default:
- Console.WriteLine("\nThis is not a oppertunity.");
- break;
- }
- }
- while (Action == false)
- {
- Console.WriteLine("\nThere are 2 oppertunities now. \nTry your luck or return to the start of the game.\nTo try your luck type: try \nTo return to the start of the game type: return");
- UserChoice = (Console.ReadLine());
- UserChoice.ToLower();
- switch (UserChoice)
- {
- case "return":
- Action = true;
- continue;
- case "try":
- Console.WriteLine("\nPLAYER2 pulled the tricker.");
- Action = true;
- break;
- default:
- Console.WriteLine("\nWhat do you want to do? ,{0}, is not a oppertunity", UserChoice);
- break;
- }
- }
- if (AI2 == 1 && Chamber1 == 1 || AI2 == 2 && Chamber2 == 1 || AI2 == 3 && Chamber3 == 1 || AI2 == 4 && Chamber4 == 1 || AI2 == 5 && Chamber5 == 1 || AI2 == 6 && Chamber6 == 1)
- {
- luck = ai.Next(1, 30);
- if (luck == 30)
- {
- System.Threading.Thread.Sleep(2000);
- Console.WriteLine("\nPff PLAYER2 got lucky there was a bullet in the chamber.\nBut the gun was made in China so the tricker broke.");
- survives = survives + 1;
- continue;
- }
- else if (luck < 30)
- {
- System.Threading.Thread.Sleep(2000);
- sentence = ai.Next(1, 4);
- if (sentence == 1)
- {
- Console.WriteLine("\nThe bullet crushed the skull from Player2.");
- }
- else if (sentence == 2)
- {
- Console.WriteLine("\nThe bullet kiled also someone behind PLAYER2.");
- }
- else if (sentence == 3)
- {
- Console.WriteLine("\nPLAYER2 killed his self silly sod.");
- }
- else if (sentence == 4)
- {
- Console.WriteLine("\nWhen the bullet hits the brain of PLAYER2, PLAYER2'S brain exploded.");
- }
- Console.WriteLine("\nPLAYER2 DIED, PLAYER1 WINS");
- pl1 = pl1 + 1;
- }
- }
- if (AI == 1 && Chamber1 == 0 || AI == 2 && Chamber2 == 0 || AI == 3 && Chamber3 == 0 || AI == 4 && Chamber4 == 0 || AI == 5 && Chamber5 == 0 || AI == 6 && Chamber6 == 0)
- {
- System.Threading.Thread.Sleep(2000);
- Console.WriteLine("\nPff PLAYER2 got lucky.");
- pl2s = pl2s + 1;
- }
- if (pl1 == 10 || pl2 == 10) {
- if (pl1 == 10) {
- Console.WriteLine("\nPLAYER1 WINS");
- Health = 0;
- continue;
- }else if (pl2 == 10) {
- Console.WriteLine("\nPLAYER2 WINS");
- Health = 0;
- continue;
- }
- }
- } // health
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement