public static bool started;
public static bool first = true;
public static int length;
public static int myPoints;
public static int computerPoints;
public static int gamesPlayed;
public static float lost;
public static string Random()
string[] choose = { "sten", "sax", "påse" };
Random random = new Random();
int randomNumber = random.Next(0, choose.Length);
return choose[randomNumber];
public static void Lines(int size)
for(int i = 0; i < size; i++) {
public static string Game() {
if(started != true) Console.WriteLine("Välj sten, sax eller påse:");
string myAnswer = Console.ReadLine();
myAnswer = myAnswer.ToLower();
string computer = Random();
if(myAnswer == "statistik") {
Console.WriteLine("Spel spelade: " + gamesPlayed);
Console.WriteLine("Vunnit: " + won);
Console.WriteLine("Förlorat: " + lost);
Console.WriteLine("Lika: " + tie);
Math.Round((won / gamesPlayed) * 100),
Math.Round((lost / gamesPlayed) * 100),
Math.Round((tie / gamesPlayed) * 100)
Console.WriteLine("\n\nProcent vunnit: " + percent[0] + "%");
Console.WriteLine("Procent förlorat: " + percent[1] + "%");
Console.WriteLine("Procent lika: " + percent[2] + "%");
} else if(!myAnswer.Contains("sten") && !myAnswer.Contains("sax") && !myAnswer.Contains("påse")) {
Console.WriteLine("Du har inte valt ett korrekt svar.");
if(myAnswer == computer) {
Console.WriteLine("Det blev lika.");
} else if((myAnswer == "sax" && computer == "påse") || (myAnswer == "påse" && computer == "sten") || (myAnswer == "sten" && computer == "sax")) {
Console.WriteLine("Du vann med " + myAnswer + " mot datorns " + computer + ".");
Console.WriteLine("[Du har nu " + myPoints + " poäng mot datorns " + computerPoints + ".]");
Console.WriteLine("Du förlorade med " + myAnswer + " mot datorns " + computer + ".");
Console.WriteLine("[Du har nu " + myPoints + " poäng mot datorns " + computerPoints + ".]");
public static void Main()