mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-09 10:20:38 +00:00
Ballon is not a typo
This commit is contained in:
parent
e13ee8430f
commit
0c9ea4e0ba
@ -20,7 +20,7 @@ import static edu.kit.informatik.model.Card.THUNDERSTORM;
|
||||
import static edu.kit.informatik.model.Card.TIGER;
|
||||
import static edu.kit.informatik.model.Card.WOOD;
|
||||
import static edu.kit.informatik.model.Item.AXE;
|
||||
import static edu.kit.informatik.model.Item.BALLOON;
|
||||
import static edu.kit.informatik.model.Item.BALLON;
|
||||
import static edu.kit.informatik.model.Item.CLUB;
|
||||
import static edu.kit.informatik.model.Item.FIREPLACE;
|
||||
import static edu.kit.informatik.model.Item.HANG_GLIDER;
|
||||
@ -133,7 +133,7 @@ public class CardGame {
|
||||
resources.removeLastOccurrence(resource);
|
||||
}
|
||||
items.add(item);
|
||||
if (item.equals(STEAMBOAT) || item.equals(BALLOON)) {
|
||||
if (item.equals(STEAMBOAT) || item.equals(BALLON)) {
|
||||
// player won
|
||||
endGame();
|
||||
return "win";
|
||||
|
@ -12,7 +12,7 @@ public enum Item {
|
||||
SAILING_RAFT,
|
||||
HANG_GLIDER,
|
||||
STEAMBOAT,
|
||||
BALLOON;
|
||||
BALLON;
|
||||
|
||||
public Card[] resourcesNeeded() {
|
||||
switch (this) {
|
||||
@ -30,7 +30,7 @@ public enum Item {
|
||||
return new Card[] {WOOD, WOOD, METAL, METAL, PLASTIC, PLASTIC, PLASTIC, PLASTIC};
|
||||
case STEAMBOAT:
|
||||
return new Card[] {METAL, METAL, METAL, METAL, METAL, METAL, PLASTIC};
|
||||
case BALLOON:
|
||||
case BALLON:
|
||||
return new Card[] {WOOD, PLASTIC, PLASTIC, PLASTIC, PLASTIC, PLASTIC, PLASTIC};
|
||||
default: // we don't have any such items, but could add some eventually
|
||||
throw new IllegalArgumentException("item does not need resources");
|
||||
@ -38,7 +38,7 @@ public enum Item {
|
||||
}
|
||||
|
||||
public boolean requiresFireplace() {
|
||||
return this.equals(STEAMBOAT) || this.equals(BALLOON);
|
||||
return this.equals(STEAMBOAT) || this.equals(BALLON);
|
||||
}
|
||||
|
||||
public boolean canHaveMoreThanOne() {
|
||||
@ -62,7 +62,7 @@ public enum Item {
|
||||
case "steamboat":
|
||||
return STEAMBOAT;
|
||||
case "ballon":
|
||||
return BALLOON;
|
||||
return BALLON;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@ -85,8 +85,8 @@ public enum Item {
|
||||
return "hangglider";
|
||||
case STEAMBOAT:
|
||||
return "steamboat";
|
||||
case BALLOON:
|
||||
return "ballon"; // lol, a type in the specification!
|
||||
case BALLON:
|
||||
return "ballon";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user