-
Notifications
You must be signed in to change notification settings - Fork 589
Expand file tree
/
Copy pathGame.java
More file actions
39 lines (28 loc) · 818 Bytes
/
Game.java
File metadata and controls
39 lines (28 loc) · 818 Bytes
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
package baseball.domain;
public class Game {
int strikeCount;
int ballCount;
int[] gameNumbers;
public Game(int[] numbers) {
gameNumbers = numbers;
}
public void initBaseBall() {
strikeCount = 0;
ballCount = 0;
}
public int getStrikeCount() {
return strikeCount;
}
public int getBallCount() {
return ballCount;
}
public int[] getGameNumbers() {
return gameNumbers;
}
public void incStrikeCount() {
strikeCount += 1;
}
public void incBallCount() {
ballCount += 1;
}
}