Advertisement
DubSlime

buildDeck

Dec 8th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. void buildDeck(Card deck[])
  2. {
  3. int index = 0;
  4. for (int i=1; i <= 19; i++){
  5. if (i==1){
  6. for (int j=0; j<3; j++){
  7. deck[index] = Card("Accident de la route", tattaque, taccident);
  8. index++;
  9. }
  10. } else if (i==2){
  11. for (int j=0; j<3; j++){
  12. deck[index] = Card("Panne d'essence", tattaque, tpanne);
  13. index++;
  14. }
  15. } else if (i==3){
  16. for (int j=0; j<3; j++){
  17. deck[index] = Card("Crevaison", tattaque, tcrevaison);
  18. index++;
  19. }
  20. } else if (i==4){
  21. for (int j=0; j<4; j++){
  22. deck[index] = Card("Limitation de vitesse", tattaque, tlimitation);
  23. index++;
  24. }
  25. } else if (i==5){
  26. for (int j=0; j<5; j++){
  27. deck[index] = Card("Feu rouge", tattaque, tfeu);
  28. index++;
  29. }
  30. } else if (i==6){
  31. for (int j=0; j<6; j++){
  32. deck[index] = Card("Réparations", tdefence, taccident);
  33. index++;
  34. }
  35. } else if (i==7){
  36. for (int j=0; j<6; j++){
  37. deck[index] = Card("Essence", tdefence, tpanne);
  38. index++;
  39. }
  40. } else if (i==8){
  41. for (int j=0; j<6; j++){
  42. deck[index] = Card("Roue de secours", tdefence, tcrevaison);
  43. index++;
  44. }
  45. } else if (i==9){
  46. for (int j=0; j<6; j++){
  47. deck[index] = Card("Fin de limitation de vitesse", tdefence, tlimitation);
  48. index++;
  49. }
  50. } else if (i==10){
  51. for (int j=0; j<14; j++){
  52. deck[index] = Card("Feu vert", tdefence, tfeu);
  53. index++;
  54. }
  55. } else if (i==11){
  56. for (int j=0; j<1; j++){
  57. deck[index] = Card("As du volant", tatout, taccident);
  58. index++;
  59. }
  60. } else if (i==12){
  61. for (int j=0; j<1; j++){
  62. deck[index] = Card("Camion-citerne", tatout, tpanne);
  63. index++;
  64. }
  65. } else if (i==13){
  66. for (int j=0; j<1; j++){
  67. deck[index] = Card("Increvable", tatout, tcrevaison);
  68. index++;
  69. }
  70. } else if (i==14){
  71. for (int j=0; j<1; j++){
  72. deck[index] = Card("Prioritaire", tatout, tlimitation);
  73. index++;
  74. }
  75. } else if (i==15){
  76. for (int j=0; j<10; j++){
  77. deck[index] = Card("25Kms", tdistance, 25);
  78. index++;
  79. }
  80. } else if (i==16){
  81. for (int j=0; j<10; j++){
  82. deck[index] = Card("50Kms", tdistance, 50);
  83. index++;
  84. }
  85. } else if (i==17){
  86. for (int j=0; j<10; j++){
  87. deck[index] = Card("75Kms", tdistance, 75);
  88. index++;
  89. }
  90. } else if (i==18){
  91. for (int j=0; j<12; j++){
  92. deck[index] = Card("100Kms", tdistance, 100);
  93. index++;
  94. }
  95. } else if (i==19){
  96. for (int j=0; j<4; j++){
  97. deck[index] = Card("200Kms", tdistance, 200);
  98. index++;
  99. }
  100. }
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement