Directory | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 13 (100.0%) | 227 (100.0%) | 17.4 |
src/slogo/ | 5 (38.5%) | 150 (66.1%) | 30.0 |
src/slogo/gui/ | 4 (30.8%) | 47 (20.7%) | 11.7 |
/ | 4 (30.8%) | 30 (13.2%) | 7.5 |
Professor Sprenkle pointed out that I don't need to duplicate code and that I can refactor a method. Meanwhile, I've come to the conclusion that I need to get more sleep. Code now more elegant. Also, Undo used to set all state variables including pen color and pen up/down status. That tended to screw with the GUI portraying everything correctly, and I've fixed it so that it now will reset position/heading/points drawn and those will be the only changes that the user will see. Finally, I took out a couple of diagnostic print statements in my methods.
Sorry for the rapid succession there; THIS is why I normally don't commit often, and this should be my last one for the day/term. Happy Holidays.
16 lines of code changed in 2 files:
Now the Undo/Redo functionality works for the GUI heading controls. I wasn't thinking. There IS duplicate code, but it is inevitable given the design (there is no central function for alteration to the turtle's state). Also, I changed the GUI back.
5 lines of code changed in 1 file:
The Undo/Redo functionality is complete. The one small chink in its functionality is that it does not recognize when the user changes the header via the GUI. This could not be fixed without major design renovations OR other smaller, less sensible bugs (e.g. the stack being off by one, double clicking the first time to make it undo, etc.). It also increases the independence between GUI/underlying program (the program does not rely upon for signs from the GUI that indicate that the program has changed; it realizes that the state has changed using other methods), which seems like a good thing to me.
To make this part of the undo/redo functionality apparent to the user, I have changed the GUI tag above the Undo/Redo frame to: "Undo/Redo Command" (sorry to meddle with your GUI, Jack)
If this is unwieldy/ugly/unclear, feel free to change it.
44 lines of code changed in 2 files:
Together with Eric's find regarding the mis-cast Object, the Undo/redo function is now no longer off by one (i.e. press twice on first undo and it wouldn't go all the way back to initial state). Also, redo stack now feeds back into the undo stack, allowing infinite undoings/redoings. It should be noted that the bug that won't allow one to execute after one has undone anything is still there, though. I'm still working on it.
58 lines of code changed in 3 files:
Now Turtle is cloneable
20 lines of code changed in 1 file:
Now with undo and redo methods that don't quite work! They don't make anything crash, though. I hope.
60 lines of code changed in 1 file:
Made files better
24 lines of code changed in 3 files: