Commits

Anonymous committed feb2ad6

yak shaving

  • Participants
  • Parent commits 1b9c608

Comments (0)

Files changed (1)

src/main/java/net/fishbulb/jcod/fov/Basic.java

         map.clearFov();
 
         xo = xmin; yo = ymin;
-        while (xo < xmax) {
+        while (xo < xmax)
             castRay(x, y, xo++, yo, r2, walls);
-        }
+
         xo = xmax - 1; yo = ymin + 1;
-        while (yo < ymax) {
+        while (yo < ymax)
             castRay(x, y, xo, yo++, r2, walls);
-        }
+
         xo = xmax - 2; yo = ymax - 1;
-        while (xo >= 0) {
+        while (xo >= 0)
             castRay(x, y, xo--, yo, r2, walls);
-        }
+
         xo = xmin; yo = ymax - 2;
-        while (yo > 0) {
+        while (yo > 0)
             castRay(x, y, xo, yo--, r2, walls);
-        }
+
         if (walls) {
             // post-processing artefact fix
             postProcess(xmin, ymin, x, y, -1, -1);
         }
     }
 
-
     void postProcess(int x0, int y0, int x1, int y1, int dx, int dy) {
-        int cx, cy;
-        for (cx = x0; cx <= x1; cx++) {
-            for (cy = y0; cy <= y1; cy++) {
+        for (int cx = x0; cx <= x1; cx++) {
+            for (int cy = y0; cy <= y1; cy++) {
                 int x2 = cx + dx;
                 int y2 = cy + dy;
                 if (!(map.contains(cx, cy) && map.isFov(cx, cy) && map.isTransparent(cx, cy)))
             }
         }
     }
-
-
 }