Skip to content

Commit b6188dc

Browse files
committed
feat: add getters for type and points in Candy class and initialize logger in CandyGame
1 parent 6657d68 commit b6188dc

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

type-object/src/main/java/com/iluwatar/typeobject/Candy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ enum Type {
4848
private int points;
4949
private final Type type;
5050

51+
public Type getType() {
52+
return type;
53+
}
54+
public int getPoints() {
55+
return points;
56+
}
5157
Candy(String name, String parentName, Type type, int points) {
5258
this.name = name;
5359
this.parent = null;

type-object/src/main/java/com/iluwatar/typeobject/CandyGame.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.iluwatar.typeobject.Candy.Type;
2828
import java.util.ArrayList;
2929
import java.util.List;
30+
import org.slf4j.Logger;
3031
import org.slf4j.LoggerFactory;
3132

3233
import lombok.extern.slf4j.Slf4j;
@@ -42,7 +43,7 @@ public class CandyGame {
4243
Cell[][] cells;
4344
CellPool pool;
4445
int totalPoints;
45-
46+
private static final Logger LOGGER = LoggerFactory.getLogger(CandyGame.class);
4647
CandyGame(int num, CellPool pool) {
4748
this.cells = new Cell[num][num];
4849
this.pool = pool;

0 commit comments

Comments
 (0)