Merge remote-tracking branch 'origin/main'

This commit is contained in:
Leonardo Brandenberger 2021-12-09 15:23:47 +01:00
commit f913eaaa2b
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public class SiedlerGame {
* three or players is not between two and four * three or players is not between two and four
*/ */
public SiedlerGame(int winPoints, int numberOfPlayers) { public SiedlerGame(int winPoints, int numberOfPlayers) {
if(winPoints < 3 || numberOfPlayers < 2 || numberOfPlayers > 4) { if(winPoints < 3 || numberOfPlayers < Config.MIN_NUMBER_OF_PLAYERS || numberOfPlayers > 4) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
bank = new Bank(); bank = new Bank();
@ -246,7 +246,7 @@ public class SiedlerGame {
resourceArrayList.add(resource); resourceArrayList.add(resource);
} }
} }
if(resourceArrayList.size() > 7){ if(resourceArrayList.size() > Config.MAX_CARDS_IN_HAND_NO_DROP){
int resourcesToRemove =resourceArrayList.size() - (resourceArrayList.size() / 2); int resourcesToRemove =resourceArrayList.size() - (resourceArrayList.size() / 2);
Random random = new Random(); Random random = new Random();
for(int i = 0; i < resourcesToRemove; i++){ for(int i = 0; i < resourcesToRemove; i++){