/* start Program */ public static void Main(string[] args) { /* start main */ Game game = new Game(); game.run(); }
// Constructors public Battle(Game currentGame, Party goodGuyParty) { mGame = currentGame; mGoodGuys = goodGuyParty; }
// Methods public static Dungeon getInstance(Game game, View view) { if (mDungeon == null) mDungeon = new Dungeon(game, view); return mDungeon; }
public void SetGame(Game g) { mGame = g; }
// reference needed to give items to party; // Constructors private Dungeon(Game game, View views) { mGame = game; view = views; // This is going to be a set size for the grid. // mGrid = new Grid(5, 5); // Create static grid array. staticGrid = new DungeonEnum[5, 5] { {DungeonEnum.FREESPACE, DungeonEnum.WALL, DungeonEnum.ITEM, DungeonEnum.ITEM, DungeonEnum.ITEM}, {DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.WALL, DungeonEnum.FREESPACE, DungeonEnum.WALL}, {DungeonEnum.FREESPACE, DungeonEnum.FREESPACE, DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.ITEM}, {DungeonEnum.WALL, DungeonEnum.ITEM, DungeonEnum.WALL, DungeonEnum.FREESPACE, DungeonEnum.WALL}, {DungeonEnum.ITEM, DungeonEnum.FREESPACE, DungeonEnum.ITEM, DungeonEnum.ITEM, DungeonEnum.FREESPACE}}; mGrid = new Grid(5, 5, staticGrid); // Keeps track of the location of players on 5 by 5 gird. //playerLocation = new int[5, 5]; playerLocationRow = 0; playerLocationColumn = 0; // Player begin at top left corner of grid. //playerLocation[0, 0] = 1; // Set starting tile and dragon tile Tile[,] sTiles = mGrid.GetTiles(); // Set the dragon image on last tile sTiles[4, 4].TileType = DungeonEnum.DRAGON; // Make sure that the first tile is a freespace sTiles[0, 0].TileType = DungeonEnum.FREESPACE; }