예제 #1
0
 // Constructor
 
 public NormalTurn(RiskGame g) 
 {
     Game = g;
     Player.NewTroopsReset();
     State = new ReinforceState(this);
     DidConquer = false;
 }
예제 #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();
        }
예제 #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"));
        }
예제 #4
0
파일: Game.cs 프로젝트: ziva006/risksharp
 public NormalTurnsGameState(RiskGame g)
 {
     Game = g;
     Turn = new NormalTurn(Game);        /// Start a normal turn
 }
예제 #5
0
파일: Game.cs 프로젝트: ziva006/risksharp
 public NotStarted(RiskGame game) { Game = game; }
예제 #6
0
파일: Player.cs 프로젝트: ziva006/risksharp
 /// Costructor
 /// 
 public RiskPlayer(string name, RiskGame g, Color c) 
 {
     Name = name;
     Game = g;
     color = c;
     Hand = new RiskHand();
 }
예제 #7
0
        // Constructor

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