Skip to content

Commit

Permalink
fixed NullPointerException during Ramsch games
Browse files Browse the repository at this point in the history
  • Loading branch information
b0n541 committed Sep 10, 2014
1 parent e6dd8d2 commit 09449a7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,16 @@ public Boolean pickUpSkat() {
public CardList getCardsToDiscard() {
// Wenn Ramschspiel
if (knowledge.getGameType() == GameType.RAMSCH) {
// aiPlayer = new AlgorithmRamsch(this, GameType.RAMSCH);
aiPlayer = new AlgorithmRamsch(this, GameType.RAMSCH);
} else {
// Ermitteln was gespielt werden soll
// normalerweise muss der BidEvaluator gesetzt sein, sonst kann er
// eigentlich garnicht hier reinlaufen
if (bidEvaluator == null) {
bidEvaluator = new BidEvaluator(knowledge.getOwnCards(),
knowledge.getPlayerPosition());
} else {
bidEvaluator.eval(knowledge.getOwnCards());
}
bidEvaluator.eval(knowledge.getOwnCards());

// Wenn Null-Spiel
if (bidEvaluator.getSuggestedGameType() == GameType.NULL) {
Expand Down

0 comments on commit 09449a7

Please sign in to comment.