-
Notifications
You must be signed in to change notification settings - Fork 3
/
GameInfo.java
64 lines (46 loc) · 1.26 KB
/
GameInfo.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.danilchican.pacman;
public class GameInfo {
private String name = null;
private int moveLeft = 0, moveRight = 0, moveUp = 0, moveDown = 0;
private int enemyMoving = 0;
private int numberOfLevel = 0;
GameInfo(String name, int moveLeft, int moveRight, int moveUp, int moveDown, int enemyMoving,
int level) {
this.name = name;
this.numberOfLevel = level;
this.moveLeft = moveLeft;
this.moveRight = moveRight;
this.moveUp = moveUp;
this.moveDown = moveDown;
this.enemyMoving = enemyMoving;
}
public String getName() {
return this.name;
}
public int getLeftMoving() {
return this.moveLeft;
}
public int getRightMoving() {
return this.moveRight;
}
public int getUpMoving() {
return this.moveUp;
}
public int getDownMoving() {
return this.moveDown;
}
public int getEnemyMoving() {
return this.enemyMoving;
}
public int getLevelNumber() {
return this.numberOfLevel;
}
public int getSteps() {
return moveLeft + moveRight + moveUp + moveDown;
}
public String printInfo() {
String info = new String(name + " Number of level: " + numberOfLevel + " Count of hero steps: "
+ getSteps() + " Count of enemies steps: " + enemyMoving);
return info;
}
}