Example #1
0
        public override GameState execute(GameState gs)
        {
            //does stuff that happens between two turns (after actions)

            GameState newGS = gs.drawPlayerCards(gs.currentPlayer());
            int       numInfectionCardsToDraw = 0;
            Map       m = newGS.map;

            //draw x infection cards
            if (m.infectionRate >= 0 && m.infectionRate < 3)
            {
                numInfectionCardsToDraw = 2;
            }
            else if (m.infectionRate >= 3 && m.infectionRate < 5)
            {
                numInfectionCardsToDraw = 3;
            }
            else if (m.infectionRate >= 5 && m.infectionRate < 7)
            {
                numInfectionCardsToDraw = 4;
            }

            newGS = newGS.drawInfectionCards(numInfectionCardsToDraw);
            newGS.advancePlayer();



            return(newGS);
        }
Example #2
0
        public override GameState execute(GameState gs)
        {
            gs = new GameState(gs, gs.map);
            gs.advancePlayer();


            return(gs);
        }
        public override GameState execute(GameState gs)
        {
            
            gs = new GameState(gs, gs.map);
            gs.advancePlayer();


            return gs;
        }