Exemple #1
0
 // Constructor
 
 public NormalTurn(RiskGame g) 
 {
     Game = g;
     Player.NewTroopsReset();
     State = new ReinforceState(this);
     DidConquer = false;
 }
Exemple #2
0
        private void InitializeGame()
        {
            Game = new RiskGame(Server.MapPath("Risk.xml"));
            Game.AiMoving += BeforeAiMove;
            Game.AiMoved += AfterAiMove;

            /// Test script
            Game.AddPlayer("Joe");
            Game.AddAiPlayer("Buddy");
            Game.AddAiPlayer("Gus");
            Game.AssignTerritoriesRandomly(new Random());
            AiCheck();

            UpdateLabels();
        }
Exemple #3
0
        // UI Events
        #region  <game setup, simple calls to the RiskGame object>

        protected void NewGame(object sender, EventArgs e)
        {
            Game = new RiskGame(Server.MapPath("Risk.xml"));
        }
Exemple #4
0
 public NormalTurnsGameState(RiskGame g)
 {
     Game = g;
     Turn = new NormalTurn(Game);        /// Start a normal turn
 }
Exemple #5
0
 public NotStarted(RiskGame game) { Game = game; }
Exemple #6
0
 /// Costructor
 /// 
 public RiskPlayer(string name, RiskGame g, Color c) 
 {
     Name = name;
     Game = g;
     color = c;
     Hand = new RiskHand();
 }
Exemple #7
0
        // Constructor

        public RiskAiPlayer(string name, RiskGame g, Color c) : base(name, g, c)
        {
            Strategy = new RandomStrategy(this);
        }