Ejemplo n.º 1
0
        public void TestMethod1()
        {
            var gw = new GameWorld(100, 100);
            superDude d = new superDude(30, 30, "player");
            gw.AddObject(d, new Point(0, 0));

            Assert.AreEqual(new Point(0, 0), gw.Player.Location, "Location setted incorretly");
        }
Ejemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var view = new Form1();
            var gw = new GameWorld(150 ,150);

            var controller = new GameController(view, gw);
            Application.Run(view);
        }
Ejemplo n.º 3
0
        public GameController(Form1 view, GameWorld gw)
        {
            this.view = view;

            this.gw = gw;
            this.gw.LocationChangedUI += new LocationChangedUIDelegate(this.OnLocationChange);

            this.view.KeyDown += new KeyEventHandler(Form1_KeyDown);

            foreach (var control in view.Controls.OfType<System.Windows.Forms.PictureBox>())
            {
                SetUpScene(control.Name, control.Size, control.Location);
            }
        }
Ejemplo n.º 4
0
 public void Initialize()
 {
     gw = new GameWorld(100, 100);
     superDude d = new superDude(30, 30, "player");
     gw.AddObject(d, new Point(0, 0));
 }