Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace fatboi
  8. {
  9. class Monkey
  10. {
  11. int Money;
  12. int Health;
  13. bool Alive;
  14. int wait;
  15. int Type;
  16. int Round;
  17. int x;
  18. int y;
  19. ConsoleColor Colour;
  20. bool[,] ishere = new bool[300,300];
  21. public Monkey(int Money, int Health,bool Alive,int Type,int Round)
  22. {
  23. this.Money = Money;
  24. this.Health = Health;
  25. this.Alive = Alive;
  26. this.Type = Type;
  27. this.Round = Round;
  28. this.x = 70;
  29. this.y = 4;
  30. switch (this.Type)
  31. {
  32. case 1:
  33. this.Colour = ConsoleColor.Red;
  34. break;
  35. case 2:
  36. this.Colour = ConsoleColor.Blue;
  37. break;
  38. case 3:
  39. this.Colour = ConsoleColor.Green;
  40. break;
  41. case 4:
  42. this.Colour = ConsoleColor.Yellow;
  43. break;
  44. case 5:
  45. this.Colour = ConsoleColor.DarkGray;
  46. break;
  47. default:
  48. break;
  49.  
  50. }
  51. switch (this.Type)
  52. {
  53. case 1:
  54. this.wait = 100;
  55. break;
  56. case 2:
  57. this.wait = 80;
  58. break;
  59. case 3:
  60. this.wait = 60;
  61. break;
  62. case 4:
  63. this.wait = 40;
  64. break;
  65. case 5:
  66. this.wait = 80;
  67. break;
  68. default:
  69. break;
  70. }
  71. }
  72. public void BloonGo()
  73. {
  74. switch (this.Type)
  75. {
  76. case 1:
  77. this.Colour = ConsoleColor.Red;
  78. break;
  79. case 2:
  80. this.Colour = ConsoleColor.Blue;
  81. break;
  82. case 3:
  83. this.Colour = ConsoleColor.Green;
  84. break;
  85. case 4:
  86. this.Colour = ConsoleColor.Yellow;
  87. break;
  88. case 5:
  89. this.Colour = ConsoleColor.DarkGray;
  90. break;
  91. default:
  92. break;
  93.  
  94. }
  95. switch (this.Type)
  96. {
  97. case 1:
  98. this.wait = 100;
  99. break;
  100. case 2:
  101. this.wait = 80;
  102. break;
  103. case 3:
  104. this.wait = 60;
  105. break;
  106. case 4:
  107. this.wait = 40;
  108. break;
  109. case 5:
  110. this.wait = 80;
  111. break;
  112. default:
  113. break;
  114. }
  115. if (this.y == 4 && this.x < 71 && this.x > 54)
  116. {
  117. Dot(this.x, this.y, ConsoleColor.Yellow);
  118. ishere[this.x, this.y] = false;
  119. this.x--;
  120. Dot(this.x, this.y, this.Colour);
  121. ishere[this.x, this.y] = true;
  122.  
  123. }
  124. else if (this.x == 54 && this.y <= 21 && this.y >= 4)
  125. {
  126. Dot(this.x, this.y, ConsoleColor.Yellow);
  127. ishere[this.x, this.y] = false;
  128. this.y++;
  129. Dot(this.x, this.y, this.Colour);
  130. ishere[this.x, this.y] = true;
  131. }
  132. else if (this.y == 22 && this.x <= 54 && this.x >= 27)
  133. {
  134. Dot(this.x, this.y, ConsoleColor.Yellow);
  135. ishere[this.x, this.y] = false;
  136. this.x--;
  137. Dot(this.x, this.y, this.Colour);
  138. ishere[this.x, this.y] = true;
  139. }
  140. else if (this.x == 26 && this.y <= 22 && this.y >= 14)
  141. {
  142. Dot(this.x, this.y, ConsoleColor.Yellow);
  143. ishere[this.x, this.y] = false;
  144. this.y--;
  145. Dot(this.x, this.y, this.Colour);
  146. ishere[this.x, this.y] = true;
  147. }
  148. else if (this.y == 13 && this.x >= 2 && this.x <= 26)
  149. {
  150. Dot(this.x, this.y, ConsoleColor.Yellow);
  151. ishere[this.x, this.y] = false;
  152. this.x--;
  153. Dot(this.x, this.y, this.Colour);
  154. ishere[this.x, this.y] = true;
  155. }
  156. }
  157. public int GetWait()
  158. {
  159. return this.wait;
  160. }
  161. public void Reset()
  162. {
  163. Dot(this.x, this.y, ConsoleColor.Yellow);
  164. this.x = 70;
  165. this.y = 4;
  166. this.Type = 1;
  167. this.Alive = false;
  168. }
  169. static void Dot(int x, int y, ConsoleColor a)
  170. {
  171. Console.BackgroundColor = a;
  172. Console.SetCursorPosition(x, y);
  173. Console.WriteLine(" ");
  174. Console.SetCursorPosition(x, y);
  175. }
  176. }
  177.  
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement