Beispiel #1
0
 /**
  * Updates the grid square at the specified location to include the specified type Will also
  * update the gui object, if there is one
  *
  * @param location The location to update
  * @param type The type to add
  * @param guiObjectFactory The gui object factory
  * @return The added grid square instance
  */
 public GridSquare updateGridSquare(
     Location location, String type, GuiObjectFactory guiObjectFactory) {
   MapGridSquare mapGridSquare = map.get(location);
   GridSquare gridSquare =
       (GridSquare) ObjectFactory.createObject("content", "game.gridSquares.GridSquare" + type);
   gridSquare.initialize(
       location, (GuiGridSquareObject) guiObjectFactory.create(gridSquare.getClass(), true));
   mapGridSquare.addGridSquare(gridSquare);
   if (guiGameMap != null) {
     guiGameMap.updateMap();
   }
   return gridSquare;
 }