-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndominusRex.java
More file actions
56 lines (52 loc) · 1.71 KB
/
Copy pathIndominusRex.java
File metadata and controls
56 lines (52 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
public class IndominusRex extends Dinosaur implements Running
{
private int smarts, weight, height;
private boolean wantsFood;
public IndominusRex(int smarts, int weight, int height, String name, String desc, boolean wantsFood)
{
super(name, desc);
this.smarts = smarts;
this.weight = weight;
this.height = height;
this.wantsFood = wantsFood;
}
public IndominusRex()
{
super("Rexy", "Scary");
this.smarts = 100;
this.weight = 300;
this.height = 25;
this.wantsFood = true;
}
@Override
public String makeNoise()
{
return "RAAAAAAAAAAAAAAAAAAAWWWWWWWWWRRRRRRRRRRRR";
}
@Override
public String play()
{
return "You give the Indominus a ball, and it eats it...";
}
@Override
public String eat()
{
wantsFood = false;
return "A giant peice of cow is dropped into the cage. The Indominus eats it and disgusts everyone... Except Manav";
}
@Override
public String run()
{
if (wantsFood == true)
{
return trickery();
}
return "The Indominus runs around the giant cage until it gets tired, then it wants food. \nI would give it food if I were you..." ;
}
public String trickery()
{
return "Angry that you won't feed it the Indominus refuses to run\n" + "The Indominus Rex camouflages into the trees, and disguises it's heat signature." +
"\nI bet you know whats about to happen...\n" +
"The Indominus Rex escapes it's cage after the zoo foolishly sends people inside the pen and it finds and eats everything, \nthen comes for YOU";
}
}