-
Notifications
You must be signed in to change notification settings - Fork 0
/
EatingGhost.java
36 lines (30 loc) · 1.45 KB
/
EatingGhost.java
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
// @author cfcurti2
//@author tdhowar2
public class EatingGhost extends Ghost {
public EatingGhost(int x, int y, int direction){
super.x = x;
super.y = y;
super.direction = direction;
super.eaten = false;
}
public void paint() {
Zen.drawImage("ghost_blue.gif", super.getX(), super.getY());
/*Zen.drawText( "g direction " + direction + (direction == 0 && ((y ==
62) || (y == 482 && x < 722 & x > 62) || (y == 181 && x >= 182 && x
<= 602) || (y == 363 && x >= 182 && x <= 602) || (y >= 267 && y <=
277 && x > 603) || y >= 267 && y <= 277 && x <= 182)) + (direction ==
1 && (x - 2 > 60 && (((y == 62) || (y == 482) || (y == 181 && x >=
183 && x <= 602) || (y == 363 && x >= 183 && x <= 602) || (y >= 267
&& y <= 277 && x > 602) || y >= 267 && y <= 277 && x <= 183)))) +
(direction == 2 && (Zen.getZenHeight() - y + 2 > 120 && !((y == 272
&& (x > 62 && x < 182 || x > 602 && x < 722)) || (y == 363 && ((x >
181 && x < 392 || x > 392 && x < 721))) || (y == 181 && x > 182 && x
< 602) || (y == 482 && (x >= 182 && x < 392 || x > 392 && x < 603))
|| (y == 62 && (x > 62 && x < 392 || x > 392 && x < 721))))) +
(direction == 3 && (y - 2 > 60 && !((y == 272 && (x > 62 && x < 182
|| x > 602 && x < 722)) || (y == 363 && x > 182 && x < 602) || (y ==
181 && (x >= 182 && x < 392 || x > 392 && x < 603)) || (y == 482 &&
((x > 62 && x < 392 || x > 392 && x < 721)))))) + " " + x + "," + y,
10, 40);*/
}
}