public Location(Map map, Point position) { IsValid (map, position).AssertIsTrue (); Map = map; Position = position; }
public void Setup() { World world = new World (); Game.Instance.World = world; world.Map = new Map (); map = world.Map; }
public WorldView(Actor center) { this.center = center; map = center.Location.Map; SetupHandlers (); base.Events = EventMask.ButtonPressMask; base.CanFocus = true; }
public void ThereAreOneHundredGridsInATenByTenMap() { Map map = new Map (10, 10); int count = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { Assert.That (map[i, j], Is.Not.Null); count++; } } Assert.That (count, Is.EqualTo (100)); }
public void SetUp() { Map map = new Map (10, 10); actor = new MockActor (new Location (map, 2, 2)); actor2 = new MockActor (new Location (map, 1, 2)); }
public Location(Map map, int x, int y) : this(map, new Point (x, y)) { }
private bool IsValid(Map map, Point position) { return map != null && map.GetGridInformation (position) != GridInformation.Invalid; }
public static Location GetRandom(Map map) { return new Location (map, Point.GetRandom (map.Width, map.Height)); }
private void CenterLocationChangedHandler(object sender, LocationChangedEventArgs args) { map = args.NewLocation.Map; recenter = true; }