alright I'm not kidding around now, this time for SURE
for SURE
This commit is contained in:
parent
d80f1bd53d
commit
19b4a31775
1 changed files with 11 additions and 11 deletions
|
@ -65,7 +65,7 @@ public class LoadProcess implements Runnable
|
||||||
* etc.
|
* etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int n = 1; //number
|
int n = 1; //how many regions have been saved already
|
||||||
int c = 1; //direction of travel: E,N,W,S - 1,2,3,4
|
int c = 1; //direction of travel: E,N,W,S - 1,2,3,4
|
||||||
int D = 1; //distance to travel
|
int D = 1; //distance to travel
|
||||||
int d = 0; //distance already traveled
|
int d = 0; //distance already traveled
|
||||||
|
@ -77,16 +77,16 @@ public class LoadProcess implements Runnable
|
||||||
if (d != D) d++;
|
if (d != D) d++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d = 0;
|
d = 0; if (B) D++; B = !B;
|
||||||
if (B) D++;
|
|
||||||
switch (c){
|
c = c == 4 ? 1 : c + 1;
|
||||||
case 1 : currentRegion[0]++; c++; break;
|
}
|
||||||
case 2 : currentRegion[1]++; c++; break;
|
switch (c)
|
||||||
case 3 : currentRegion[0]--; c++; break;
|
{
|
||||||
case 4 : currentRegion[1]--; c=1; break;
|
case 1 : currentRegion[0]++; break;
|
||||||
}
|
case 2 : currentRegion[1]++; break;
|
||||||
B = !B;
|
case 3 : currentRegion[0]--; break;
|
||||||
c++;
|
case 4 : currentRegion[1]--; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final boolean isFinished(){
|
final boolean isFinished(){
|
||||||
|
|
Loading…
Reference in a new issue