Fix:Game Automatic Slot
This commit is contained in:
@@ -301,10 +301,9 @@ public class Game implements Serializable {
|
||||
tempCard.insert(player);
|
||||
board.removeUpperTribeCard(tempCard);
|
||||
currentState.UpperDrawn();
|
||||
if(currentState.getNUpper() ==0 && currentState.getNLower() ==0)
|
||||
if((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0)))
|
||||
nextPlayerSetup();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,7 +342,7 @@ public class Game implements Serializable {
|
||||
tempCard.insert(player);
|
||||
board.removeLowerTribeCard(tempCard);
|
||||
currentState.LowerDrawn();
|
||||
if(currentState.getNLower() ==0 && currentState.getNUpper() ==0)
|
||||
if((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0)))
|
||||
nextPlayerSetup();
|
||||
return true;
|
||||
|
||||
@@ -382,7 +381,7 @@ public class Game implements Serializable {
|
||||
}
|
||||
else
|
||||
return false;
|
||||
if(currentState.getNLower() ==0 && currentState.getNUpper() ==0)
|
||||
if((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0)))
|
||||
nextPlayerSetup();
|
||||
|
||||
return true;
|
||||
@@ -422,7 +421,7 @@ public class Game implements Serializable {
|
||||
}
|
||||
else
|
||||
return false;
|
||||
if(currentState.getNLower() ==0 && currentState.getNUpper() ==0)
|
||||
if((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0)))
|
||||
nextPlayerSetup();
|
||||
|
||||
return true;
|
||||
@@ -555,10 +554,16 @@ public class Game implements Serializable {
|
||||
return;
|
||||
}
|
||||
currentState.GameStageUpdate(GameStages.RESOLVING_ACTIONS);
|
||||
for (Map.Entry<Slot,Player> s : slotMap.entrySet()) {
|
||||
if (s.getValue()!=null) {
|
||||
currentState.PlayerUpdate(s.getValue(), s.getKey());
|
||||
return;
|
||||
for (Slot s : slotMap.keySet()) {
|
||||
if (slotMap.get(s) != null) {
|
||||
currentState.PlayerUpdate(slotMap.get(s), s);
|
||||
if(!((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0))))
|
||||
break;
|
||||
else
|
||||
{
|
||||
orderLogicCard.push(currentState.getCurrentPlayer());
|
||||
slotMap.put(currentState.getSlot(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -570,9 +575,17 @@ public class Game implements Serializable {
|
||||
for (Slot s : slotMap.keySet()) {
|
||||
if (slotMap.get(s) != null) {
|
||||
currentState.PlayerUpdate(slotMap.get(s), s);
|
||||
if((currentState.getNLower() ==0 ||( getLowerListTribeCards().size()==0 && getLowerListBuilding().size()==0)) && ((currentState.getNUpper() ==0)||( getUpperListTribeCards().size()==0 && getUpperListBuilding().size()==0))) {
|
||||
orderLogicCard.push(currentState.getCurrentPlayer());
|
||||
|
||||
slotMap.put(currentState.getSlot(), null);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(slotMap.values().stream().allMatch(v -> v == null))
|
||||
{
|
||||
currentState.GameStageUpdate(GameStages.OPTIONAL_CARD_EFFECT);
|
||||
|
||||
Reference in New Issue
Block a user