Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace fatboi
- {
- class Monkey
- {
- int Money;
- int Health;
- bool Alive;
- int wait;
- int Type;
- int Round;
- int x;
- int y;
- ConsoleColor Colour;
- bool[,] ishere = new bool[300,300];
- public Monkey(int Money, int Health,bool Alive,int Type,int Round)
- {
- this.Money = Money;
- this.Health = Health;
- this.Alive = Alive;
- this.Type = Type;
- this.Round = Round;
- this.x = 70;
- this.y = 4;
- switch (this.Type)
- {
- case 1:
- this.Colour = ConsoleColor.Red;
- break;
- case 2:
- this.Colour = ConsoleColor.Blue;
- break;
- case 3:
- this.Colour = ConsoleColor.Green;
- break;
- case 4:
- this.Colour = ConsoleColor.Yellow;
- break;
- case 5:
- this.Colour = ConsoleColor.DarkGray;
- break;
- default:
- break;
- }
- switch (this.Type)
- {
- case 1:
- this.wait = 100;
- break;
- case 2:
- this.wait = 80;
- break;
- case 3:
- this.wait = 60;
- break;
- case 4:
- this.wait = 40;
- break;
- case 5:
- this.wait = 80;
- break;
- default:
- break;
- }
- }
- public void BloonGo()
- {
- switch (this.Type)
- {
- case 1:
- this.Colour = ConsoleColor.Red;
- break;
- case 2:
- this.Colour = ConsoleColor.Blue;
- break;
- case 3:
- this.Colour = ConsoleColor.Green;
- break;
- case 4:
- this.Colour = ConsoleColor.Yellow;
- break;
- case 5:
- this.Colour = ConsoleColor.DarkGray;
- break;
- default:
- break;
- }
- switch (this.Type)
- {
- case 1:
- this.wait = 100;
- break;
- case 2:
- this.wait = 80;
- break;
- case 3:
- this.wait = 60;
- break;
- case 4:
- this.wait = 40;
- break;
- case 5:
- this.wait = 80;
- break;
- default:
- break;
- }
- if (this.y == 4 && this.x < 71 && this.x > 54)
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- ishere[this.x, this.y] = false;
- this.x--;
- Dot(this.x, this.y, this.Colour);
- ishere[this.x, this.y] = true;
- }
- else if (this.x == 54 && this.y <= 21 && this.y >= 4)
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- ishere[this.x, this.y] = false;
- this.y++;
- Dot(this.x, this.y, this.Colour);
- ishere[this.x, this.y] = true;
- }
- else if (this.y == 22 && this.x <= 54 && this.x >= 27)
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- ishere[this.x, this.y] = false;
- this.x--;
- Dot(this.x, this.y, this.Colour);
- ishere[this.x, this.y] = true;
- }
- else if (this.x == 26 && this.y <= 22 && this.y >= 14)
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- ishere[this.x, this.y] = false;
- this.y--;
- Dot(this.x, this.y, this.Colour);
- ishere[this.x, this.y] = true;
- }
- else if (this.y == 13 && this.x >= 2 && this.x <= 26)
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- ishere[this.x, this.y] = false;
- this.x--;
- Dot(this.x, this.y, this.Colour);
- ishere[this.x, this.y] = true;
- }
- }
- public int GetWait()
- {
- return this.wait;
- }
- public void Reset()
- {
- Dot(this.x, this.y, ConsoleColor.Yellow);
- this.x = 70;
- this.y = 4;
- this.Type = 1;
- this.Alive = false;
- }
- static void Dot(int x, int y, ConsoleColor a)
- {
- Console.BackgroundColor = a;
- Console.SetCursorPosition(x, y);
- Console.WriteLine(" ");
- Console.SetCursorPosition(x, y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement