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"); }
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); }
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); } }
public void Initialize() { gw = new GameWorld(100, 100); superDude d = new superDude(30, 30, "player"); gw.AddObject(d, new Point(0, 0)); }