Exemplo n.º 1
0
        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];
        }
Exemplo n.º 2
0
 public void setNextTurn()
 {
     this.turnCounter++;
     this.currentTurn = (Turn)this.turns[this.turnCounter];
 }
Exemplo n.º 3
0
 public void removeTurn(Turn a)
 {
     this.turns.Remove(a);
 }
Exemplo n.º 4
0
 public void setCurrentTurn(Turn turn)
 {
     this.currentTurn = turn;
 }
Exemplo n.º 5
0
 public void addTurn(Turn a)
 {
     this.turns.Add(a);
 }