浏览代码

trying to avoid OBO errors

tsdedhar 6 年之前
父节点
当前提交
899d7a5fe3

二进制
assignments/a2/.gradle/4.7/fileHashes/fileHashes.bin


二进制
assignments/a2/.gradle/4.7/fileHashes/fileHashes.lock


二进制
assignments/a2/.gradle/4.7/taskHistory/taskHistory.bin


二进制
assignments/a2/.gradle/4.7/taskHistory/taskHistory.lock


二进制
assignments/a2/.gradle/buildOutputCleanup/buildOutputCleanup.lock


二进制
assignments/a2/build/classes/java/main/Model.class


二进制
assignments/a2/build/libs/a2-1.0-SNAPSHOT.jar


+ 3 - 3
assignments/a2/src/main/java/Model.java

@@ -100,11 +100,11 @@ public class Model extends Observable
     //System.out.println("curthing is: " + thingies.indexOf(curThingy));
     //System.out.println("curthing is: " + thingies.indexOf(curThingy));
     curThingy = thingies.get(index);
     curThingy = thingies.get(index);
     // off by one adjustments if we're at the end of a thingy
     // off by one adjustments if we're at the end of a thingy
-    //if (index > 0 && curThingy.getVisibleLen() == 0 && tempLen > x) curThingy = thingies.get(index - 1);
-    //if (curThingy.getVisibleLen() == curThingy.getPoints().size() && tempLen < x) curThingy = thingies.get(index + 1);
+    if (index > 0 && curThingy.getVisibleLen() == 0 && tempLen > x) curThingy = thingies.get(index - 1);
+    if (curThingy.getVisibleLen() == curThingy.getPoints().size() && tempLen < x) curThingy = thingies.get(index + 1);
     // now modify tempThingy
     // now modify tempThingy
     // if we want to go back in time
     // if we want to go back in time
-    if (tempLen > x)
+    if (tempLen > x && curThingy.getVisibleLen() != curThingy.getPoints().size())
     {
     {
       curThingy.reduceLen();
       curThingy.reduceLen();
       totalVisibleLen--;
       totalVisibleLen--;