Beispiel #1
0
 public Game(Map map, PlayerBase[] players)
 {
     if (map == null)
         throw new ArgumentNullException("map");
     if (players == null)
         throw new ArgumentNullException("players");
     Map = map;
     PlayerList = players;
     ArmyList = new Dictionary<int, ArmyBase>();
 }
Beispiel #2
0
        public GameScreen(LogicGraph game)
            : base(game)
        {
            Resource = new ResourceManager();
            btnnode = new Button(game, "Button110.png", "Add Node", Vector2.Zero, new Size2(110, 30), null, Color.White);
            btnroad = new Button(game, "Button110.png", "Add Road", new Vector2(110, 0), new Size2(110, 30), null, Color.White);
            btnrenode = new Button(game, "Button150.png", "Remove Node", new Vector2(220, 0), new Size2(150, 30), null, Color.White);
            btnrerode = new Button(game, "Button150.png", "Remove Road", new Vector2(370, 0), new Size2(150, 30), null, Color.White);
            btnnode.Click += btnnode_Click;
            btnroad.Click += btnroad_Click;
            btnrenode.Click += btnrenode_Click;
            btnrerode.Click += btnrerode_Click;

            this.OnButtonUp += GameScreen_OnButtonUp;

            map = new Map();
        }