fix: typo
This commit is contained in:
@@ -178,7 +178,7 @@ public enum Item implements Buildable {
|
|||||||
@Getter
|
@Getter
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
private final boolean isPLaceable;
|
private final boolean isPlaceable;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final int price;
|
private final int price;
|
||||||
@@ -188,17 +188,17 @@ public enum Item implements Buildable {
|
|||||||
@Getter
|
@Getter
|
||||||
private Function<Game, Boolean> canBeBoughtFunction;
|
private Function<Game, Boolean> canBeBoughtFunction;
|
||||||
|
|
||||||
Item(String name, boolean isPLaceable, int price) {
|
Item(String name, boolean isPlaceable, int price) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.isPLaceable = isPLaceable;
|
this.isPlaceable = isPlaceable;
|
||||||
this.canBeBuiltFunction = ignored -> isPLaceable;
|
this.canBeBuiltFunction = ignored -> isPlaceable;
|
||||||
this.price = price;
|
this.price = price;
|
||||||
this.canBeBoughtFunction = ignored -> true;
|
this.canBeBoughtFunction = ignored -> true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBuild(Game game) {
|
public boolean canBuild(Game game) {
|
||||||
if (!isPLaceable) {
|
if (!isPlaceable) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return canBeBuiltFunction.apply(game);
|
return canBeBuiltFunction.apply(game);
|
||||||
|
|||||||
Reference in New Issue
Block a user