[root]/src/slogo/gui
images
(4 files, 0 lines)
Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 21 (100.0%) | 384 (100.0%) | 18.2 |
gehmane | 12 (57.1%) | 258 (67.2%) | 21.5 |
ivyj | 4 (19.0%) | 72 (18.8%) | 18.0 |
richardsonw | 4 (19.0%) | 47 (12.2%) | 11.7 |
tshishikub | 1 (4.8%) | 7 (1.8%) | 7.0 |
Did some refactoring of Parsing code so that have less duplicated code.
- mainly created methods to parse instruction parameters (in SLogoParser). This code showed up in a lot of places, so it was good to make into methods.
Added a lot of tests to SLogoParserTest
Added a few methods to Turtle class so that the Parsing code does less/knows less about Turtle's innerworkings. (Required adding "notifyListeners" to some of Turtle's methods)
Cleaned up code: removed debugging statements
10 lines of code changed in 1 file:
Made some major and minor changes
Created instruction hierarchy:
- ConditionalInstructions
- return 1 or 0 when evaluated
- NumericInstructions
- return a number when evaluated
- OneParameterInstructions
- have a parameter (often numeric) that needs to be evaluated
Made lots of changes because of the above changes. Needed to update the parsers and the instruction classes.
Added some methods to the Turtle class so that the Instructions have less knowledge of the Turtle's innerworkings.
Moved SubroutineFactory to slogo.language package instead of slogo.expression
Updated comments in many instructions (use the Javadoc in the evaluate)
105 lines of code changed in 1 file:
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.
0 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.
19 lines of code changed in 1 file:
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.
8 lines of code changed in 1 file:
refactoring:
renamed token/classes/methods/fields named penIsDown to isPenDown
the old name looked too much like something else (especially when
typed as a command in all lower case)
7 lines of code changed in 1 file:
Fixed Will's error with clone() (LOOK AT THE API NEXT TIME!!!)
2 lines of code changed in 1 file:
minor bug fixes for clean and reset methods so that turtle is drawn after screen is cleared
2 lines of code changed in 1 file:
added "clean" method which clears the array of lines but leaves the turtle as is.
34 lines of code changed in 1 file:
minor variable change
2 lines of code changed in 1 file:
Now Turtle is cloneable
20 lines of code changed in 1 file:
add getTowardsHeading method for Towards
12 lines of code changed in 1 file:
several changes of note: drawing lines is now handled by PenLine class, and color changing works for the lines
130 lines of code changed in 2 files:
added pen color changing functionality, although the color of a given line drawn is not saved with the Turtle, so whenever the turtle is updated (moved or rotated) and the color has been changed, all previous lines drawn are changed to that color
63 lines of code changed in 1 file:
added pen color changeability
6 lines of code changed in 1 file:
1 lines of code changed in 1 file:
all functionality works as normal for the presentation
5 lines of code changed in 1 file:
Added getter methods for startX and startY variables
8 lines of code changed in 2 files:
Added methods to allow GUI to access turtle start point
10 lines of code changed in 1 file:
Added boolean penIsDown variable to allow GUI/user to specify when the pen is up or down (thus, when the turtle is drawing or not drawing).
Also added a rotate method to add or subtract an int representation of the number of degrees the turtle should turn.
33 lines of code changed in 1 file:
(3 more)