public Round(string rt) { int numOfBandits = GameManager.getInstance().bandits.Count; Debug.Assert(numOfBandits >= 2 && numOfBandits <= 6); this.roundTypeAsString = rt; this.turnCounter = 0; this.turns = new ArrayList(); if (rt.Equals("AngryMarshal") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("SWITCHING")); } else if (rt.Equals("SwivelArm") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("Braking") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("TakeItAll") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("SPEEDINGUP")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("PassengersRebellion") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("Bridge") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("SPEEDINGUP")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("Cave") && numOfBandits <= 4) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("AngryMarshal")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("SWITCHING")); } else if (rt.Equals("SwivelArm")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("Braking")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("STANDARD")); } else if (rt.Equals("TakeItAll")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("SPEEDINGUP")); turns.Add(new Turn("SWITCHING")); } else if (rt.Equals("PassengersRebellion")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("SWITCHING")); } else if (rt.Equals("Bridge")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("SPEEDINGUP")); } else if (rt.Equals("Cave")) { turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); turns.Add(new Turn("STANDARD")); turns.Add(new Turn("TUNNEL")); } this.currentTurn = (Turn)this.turns[0]; }
public void setNextTurn() { this.turnCounter++; this.currentTurn = (Turn)this.turns[this.turnCounter]; }
public void removeTurn(Turn a) { this.turns.Remove(a); }
public void setCurrentTurn(Turn turn) { this.currentTurn = turn; }
public void addTurn(Turn a) { this.turns.Add(a); }