Using Values of Config in SiedlerGame.java
This commit is contained in:
parent
51defac6f3
commit
c28efe5331
|
@ -35,7 +35,7 @@ public class SiedlerGame {
|
|||
* three or players is not between two and four
|
||||
*/
|
||||
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();
|
||||
}
|
||||
bank = new Bank();
|
||||
|
@ -246,7 +246,7 @@ public class SiedlerGame {
|
|||
resourceArrayList.add(resource);
|
||||
}
|
||||
}
|
||||
if(resourceArrayList.size() > 7){
|
||||
if(resourceArrayList.size() > Config.MAX_CARDS_IN_HAND_NO_DROP){
|
||||
int resourcesToRemove =resourceArrayList.size() - (resourceArrayList.size() / 2);
|
||||
Random random = new Random();
|
||||
for(int i = 0; i < resourcesToRemove; i++){
|
||||
|
|
Loading…
Reference in New Issue