public boolean isVisible ( Tiled tiled ) { final int tx = tiled . getInTileX ( ) ; final int ty = tiled . getInTileY ( ) ; final int tw = tiled . getInTileWidth ( ) - 1 ; final int th = tiled . getInTileHeight ( ) - 1 ; for ( int ctx = tx ; ctx <= tx + tw ; ctx ++ ) { for ( int cty = ty ; cty <= ty + th ; cty ++ ) { if ( isFogged ( ctx , cty ) || ! isVisited ( ctx , cty ) ) { return false ; } } } return true ; }
Check if the tile is currently visible .