Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Roll(string[] player,List<int> palya, int[] places)
- {
- int cp = 0;
- int x=0;
- Random rnd2 = new Random();
- do
- {
- Console.WriteLine(player[cp] + "játékos jön, nyomj egy gombot.");
- Console.ReadKey();
- x = 0;
- x = rnd2.Next(1, 7);
- Console.WriteLine("Dobtál ennyit:" + x);
- places[cp] = palya.ElementAt(cp) + x;
- Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + "helyre.");
- if (x == 6)
- {
- Console.WriteLine("Mivel hatot dobtál újra dobhatsz. Nyomj egy gombot.");
- Console.ReadKey();
- x = 0;
- x = rnd2.Next(1, 7);
- Console.WriteLine("Dobtál ennyit:" + x);
- places[cp] = palya.ElementAt(places[cp]) + x;
- Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + " helyre.");
- Console.ReadKey();
- }
- if (palya.ElementAt(places[cp]) == 1)
- {
- Console.WriteLine("Mivel a mező eggyes Skippeltél");
- }
- else if (palya.ElementAt(places[cp]) == 2)
- {
- places[cp] = places[cp] + 2;
- Console.WriteLine("Mivel a mező kettes, előreléptél kettőt, ide: " + palya.ElementAt(cp));
- }
- else if (palya.ElementAt(places[cp]) == 3)
- {
- places[cp] = places[cp] - 2;
- Console.WriteLine("Mivel a mező hármas, hátraléptél ketőtt ide: " + palya.ElementAt(cp));
- }
- else if (palya.ElementAt(places[cp]) == 4)
- {
- Console.WriteLine("Mivel négyesre léptél te jössz megint. Nyomj egy gombot.");
- Console.ReadKey();
- x = 0;
- x = rnd2.Next(1, 7);
- Console.WriteLine("Dobtál ennyit:" + x);
- places[cp] = palya.ElementAt(places[cp]) + x;
- Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + " helyre.");
- Console.ReadKey();
- }
- else if (palya.ElementAt(places[cp]) == 5)
- {
- }
- } while (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement