if(getOptions().booleanOption("inf_move_multi") && entity instanceof Infantry) { if((getInfantryLeft(entity.getOwnerId()) % getOptions().intOption("inf_proto_move_multi")) != 1) {   if(hasMoreTurns()) { GameTurn nextTurn = (GameTurn)turnVector.elementAt(turnIndex + 1); if(nextTurn instanceof GameTurn.EntityClassTurn) { GameTurn.EntityClassTurn ect = (GameTurn.EntityClassTurn)nextTurn; if(ect.isValidClass(GameTurn.CLASS_INFANTRY) && !ect.isValidClass(~GameTurn.CLASS_INFANTRY)) { turnVector.removeElementAt(turnIndex + 1); } } } return; } }  if(getOptions().booleanOption("protos_move_multi") && entity instanceof Protomech) { if((getProtomechsLeft(entity.getOwnerId()) % getOptions().intOption("inf_proto_move_multi")) != 1) {   if(hasMoreTurns()) { GameTurn nextTurn = (GameTurn)turnVector.elementAt(turnIndex + 1); if(nextTurn instanceof GameTurn.EntityClassTurn) { GameTurn.EntityClassTurn ect = (GameTurn.EntityClassTurn)nextTurn; if(ect.isValidClass(GameTurn.CLASS_PROTOMECH) && !ect.isValidClass(~GameTurn.CLASS_PROTOMECH)) { turnVector.removeElementAt(turnIndex + 1); } } } return; } }
    public void removeTurnFor(Entity entity) {        for (int i = turnVector.size() - 1; i >= turnIndex; i--) {            GameTurn turn = (GameTurn)turnVector.elementAt(i);            if (turn.isValidEntity(entity, this)) {                turnVector.removeElementAt(i);                break;            }        }    }