Advertisement
Guest User

Untitled

a guest
Jun 6th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. public static void Roll(string[] player,List<int> palya, int[] places)
  2. {
  3. int cp = 0;
  4. int x=0;
  5. Random rnd2 = new Random();
  6.  
  7. do
  8. {
  9. Console.WriteLine(player[cp] + "játékos jön, nyomj egy gombot.");
  10. Console.ReadKey();
  11. x = 0;
  12. x = rnd2.Next(1, 7);
  13. Console.WriteLine("Dobtál ennyit:" + x);
  14. places[cp] = palya.ElementAt(cp) + x;
  15. Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + "helyre.");
  16. if (x == 6)
  17. {
  18. Console.WriteLine("Mivel hatot dobtál újra dobhatsz. Nyomj egy gombot.");
  19. Console.ReadKey();
  20. x = 0;
  21. x = rnd2.Next(1, 7);
  22. Console.WriteLine("Dobtál ennyit:" + x);
  23. places[cp] = palya.ElementAt(places[cp]) + x;
  24. Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + " helyre.");
  25. Console.ReadKey();
  26. }
  27. if (palya.ElementAt(places[cp]) == 1)
  28. {
  29. Console.WriteLine("Mivel a mező eggyes Skippeltél");
  30. }
  31. else if (palya.ElementAt(places[cp]) == 2)
  32. {
  33. places[cp] = places[cp] + 2;
  34. Console.WriteLine("Mivel a mező kettes, előreléptél kettőt, ide: " + palya.ElementAt(cp));
  35. }
  36. else if (palya.ElementAt(places[cp]) == 3)
  37. {
  38. places[cp] = places[cp] - 2;
  39. Console.WriteLine("Mivel a mező hármas, hátraléptél ketőtt ide: " + palya.ElementAt(cp));
  40. }
  41. else if (palya.ElementAt(places[cp]) == 4)
  42. {
  43. Console.WriteLine("Mivel négyesre léptél te jössz megint. Nyomj egy gombot.");
  44. Console.ReadKey();
  45. x = 0;
  46. x = rnd2.Next(1, 7);
  47. Console.WriteLine("Dobtál ennyit:" + x);
  48. places[cp] = palya.ElementAt(places[cp]) + x;
  49. Console.WriteLine("Léptél a: " + palya.ElementAt(cp) + " helyre.");
  50. Console.ReadKey();
  51. }
  52. else if (palya.ElementAt(places[cp]) == 5)
  53. {
  54.  
  55. }
  56. } while (true);
  57.  
  58.  
  59.  
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement