Ejemplo n.º 1
0
        private Int32 calculateIncome(Player player_)
        {
            Int32 income = START_INCOME;

            /*foreach (var town in player_._towns)
            {
                income += town._income;
            }*/

            foreach (var unit in player_._units)
            {
                income -= unit._stats._resurveCost;
            }
            return income;
        }
Ejemplo n.º 2
0
 private Boolean isEndGame(Player defender_)
 {
     if (defender_._units.Count == 0)
     {
         return true;
     }
     return false;
 }
Ejemplo n.º 3
0
 public void newGame(String p1Name_, int p1Race_, String p2Name_, int p2Race_ )
 {
     _players[0] = new Player(p1Name_,(RaceType)p1Race_,START_MONEY,START_INCOME);
     _players[1] = new Player(p2Name_,(RaceType)p2Race_,START_MONEY,START_INCOME);
     _currentPlayerIndex = 0;
     _turn = 1;
     _gameOver = false;
 }