Uses of Class
model.map.MapGrid

Packages that use MapGrid
Package
Description
JavaFX UI layer — all Scene screens and the GameController connecting the View to the Model.
Core game control package containing GameManager, ZoneManager, GameState, and GameEventListener.
11x11 map structure comprising MapGrid, Cell, CellType, and MapLoader.
  • Uses of MapGrid in application

    Methods in application with parameters of type MapGrid
    Modifier and Type
    Method
    Description
    void
    BoardScene.refreshMapFromModel(MapGrid map)
    Re-renders the entire map from the model, used when the map changes.
    private void
    BoardScene.renderFromModel(MapGrid map)
    Re-renders the entire map from the given model, used when the map changes (item pickup, zone shrink).
    Constructors in application with parameters of type MapGrid
    Modifier
    Constructor
    Description
     
    BoardScene(String p1Class, String p2Class, MapGrid initialMap, String p1Name, String p2Name, double p1Hp, double p1MaxHp, int p1Atk, int p1Def, double p2Hp, double p2MaxHp, int p2Atk, int p2Def)
    Creates the Board Scene with the initial map and player stat data.
  • Uses of MapGrid in model.game

    Fields in model.game declared as MapGrid
    Modifier and Type
    Field
    Description
    private MapGrid
    GameManager.map
    Current map.
    Methods in model.game that return MapGrid
    Modifier and Type
    Method
    Description
    GameManager.getMap()
     
    Methods in model.game with parameters of type MapGrid
    Modifier and Type
    Method
    Description
    boolean
    ZoneManager.applyZoneDamage(Player p1, Player p2, MapGrid map)
    Applies zone damage to any player standing on lava.
    private void
    Converts all cells outside the safe zone to lava and removes any items or goblins on those cells.
    boolean
    ZoneManager.onRoundEnd(int round, MapGrid map)
    Called at the end of every round to check whether the zone should shrink.
  • Uses of MapGrid in model.map

    Methods in model.map that return MapGrid
    Modifier and Type
    Method
    Description
    private static MapGrid
    MapLoader.buildMap(int[][] data)
    Builds a MapGrid from a raw int[][] data array, placing random items (HealItem, BuffItem, or DefenseItem) and Goblins in the designated cells.
    static MapGrid
    MapLoader.loadMap(int index)
    Loads the map at the specified index, intended for testing.
    static MapGrid
    MapLoader.loadRandomMap()
    Randomly loads one of the 10 maps, ensuring no repetition until all maps have been used.