ArrayList drawableTiles = new ArrayList();drawableTiles.add( (int)(playerPos.x / gridSize), (int) (playerPos.y / gridSize) );for (float angle = 0; angle < 2*Math.PI; angle += Math.PI / 8.0f){ float checkX = playerPos.x; float checkY = playerPos.y; while (positionIsNotWall(checkX, checkY)) { checkX += Math.cos(angle) * gridSize; checkY += Math.sin(angle) * gridSize; drawableTiles.add( (int)(checkX / gridSize), (int)(checkY / gridSize) ); }}