code: public void drawFov(Graphic g, int x, int y, int gridH, int gridV, Surface surface)
      {
          final int h = x + (int) Math.floor((getX() + getViewX()) / gridH);
          final int v = y + (int) -Math.floor((getY() + getHeight()) / gridV);
          final int tileWidth = getWidth() / gridH;
          final int tileHeight = getHeight() / gridV;
          g.drawRect(h, v + surface.getHeight(), tileWidth, tileHeight, false);
      }
docs: Draw the camera field of view according to a grid.
  
  @param g The graphic output.
  @param x The horizontal location.
  @param y The vertical location.
  @param gridH The horizontal grid.
  @param gridV The vertical grid.
  @param surface The surface referential (minimap).