public void TestDungeonGame() { var dungeon = new int[, ] { { -2, -3, 3 }, { -5, -10, 1 }, { 10, 30, -5 }, }; var r = DungeonGame.RescurePrincess(dungeon); Assert.AreEqual(r, 7); dungeon = new int[, ] { { -1, -2, -3, -4, -5 }, { -6, -7, -8, -9, -10 }, { -11, -12, -13, -14, -15 }, { -16, -17, -18, -19, -20 }, { -21, -22, -23, -24, -25 }, }; r = DungeonGame.RescurePrincess(dungeon); Assert.AreEqual(r, 86); }
public Spell(SpellDef def, DungeonObject owner, Vector2 position) : base(def, position, "spells", state: Cast) { SpellDef = def; Position = new((int)Position.X / 16 * 16, (int)Position.Y / 16 * 16); game = DungeonGame.Instance; player = DungeonPlayer.Instance; Owner = owner; }
public Fight(Person person, DungeonGame.enemy enemy, Form1 form) { this.person = person; this.enemy = enemy; this.form = form; }
static void Main() { using var game = new DungeonGame(); game.Run(); }