Line 14: |
Line 14: |
| * July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the 'Turtle' palette: 'forward', 'back', 'setxy', 'left', and 'right'. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily. | | * July 1 – July 21 (3 weeks): Implement the first transformations from blocks to Python code. Only cover the following blocks from the 'Turtle' palette: 'forward', 'back', 'setxy', 'left', and 'right'. Make sure the exported code imports the correct modules from Turtle Blocks and can be run on the command line (or in Pippy). Keep the implementation modular, so more blocks can be added easily. |
| ** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into. | | ** July 1 – July 5 (1 week): Test the two Python code generators for suitability for my project. Develop a concept of how the blocks know what Python code they will be transformed into. |
− | ** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class <code>Primitive</code>). Use the class in TA and make sure calling instances works. | + | ** July 6 – July 12 (1 week): Replace previous implementation of primitives (the backend of the blocks) with a class whose instances can be called to execute the block, or be transformed to a Python AST (class <code>Primitive</code>). Use the class in TA and make sure calling instances works. Add <code>Primitive</code> objects for the first five blocks and the 'repeat' block. |
− | ** July 13 – July 21 (1 week): Work on transforming <code>Primitive</code> objects to Python ASTs. | + | ** July 13 – July 21 (1 week): Work on transforming <code>Primitive</code> objects to Python ASTs. Implement special handling for loop blocks when transforming them to ASTs. The sample program basics-square.ta can now be exported to python code. |
− | * July 22 – July 28 (1 week): Implement transformations of the rest of the 'Turtle' palette, and the complete 'Pen' and 'Pen colors' palettes. (These should be similar enough to the first four blocks that they can be implemented quickly.) | + | * July 22 – July 28 (1 week): Introduce constant arguments to <code>Primitive</code> objects. Add a <code>Primitive</code> object for the 'forever' block. |
− | * July 29 – August 2: Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to blocks from the 'Turtle', 'Pen', and 'Pen colors' palette, but it can easily be extended to cover the other blocks. | + | * July 29 – August 2: The exported Python code now uses TurtleArt's internal execution engine. This makes infinite loops executable and enables the user to watch the program run. Add a <code>Primitive</code> object for the 'clean' block. Implement nice error handling when exporting a project and when running the exported code. |
| + | * Midterm evaluation: Block programs can be exported to Python code that can be run outside of Turtle Blocks. The export functionality is limited to a few blocks (those that have a <code>Primitive</code> object), but it can easily be extended to cover the rest. |
| + | |
| * August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code: | | * August 3 – September 15 (6 weeks): Implement transformations of all other blocks to Python code: |
| ** August 3 – August 11 (1 week) | | ** August 3 – August 11 (1 week) |
| + | *** The complete 'Pen' palette |
| + | *** Boolean operations from the 'Numeric operators' palette |
| + | *** The rest of the loops from the 'Flow operators' palette |
| + | *** Conditionals from the 'Flow operators' palette |
| + | ** August 12 – August 18 (1 week) |
| + | *** The complete 'Pen colors' palette |
| *** Numeric operations from the 'Numeric operators' palette and screen dimensions from the 'Presentation templates' palette<ref name="requires-add-imports" group="note" /> | | *** Numeric operations from the 'Numeric operators' palette and screen dimensions from the 'Presentation templates' palette<ref name="requires-add-imports" group="note" /> |
− | *** Boolean operations from the 'Numeric operators' palette and conditionals from the 'Flow operators' palette
| + | *** Variables from the 'Action stacks' palette |
− | ** August 12 – August 18 (1 week)
| + | *** Action stacks (functions) from the 'Action stacks' palette |
− | *** Variables from the 'Action stacks' palette and heaps from the 'Extra options' palette | |
− | *** Loops from the 'Flow operators' palette and functions from the 'Action stacks' palette | |
| ** August 19 – August 25 (1 week) | | ** August 19 – August 25 (1 week) |
| + | *** Heaps from the 'Extra options' palette |
| *** Runtime control (e.g., exit, suspension) from the 'Flow operators' palette | | *** Runtime control (e.g., exit, suspension) from the 'Flow operators' palette |
| *** External functions (chr, int, mathematical function, tamyblock.py) from the 'Extra options' palette<ref name="requires-add-imports" group="note" /> | | *** External functions (chr, int, mathematical function, tamyblock.py) from the 'Extra options' palette<ref name="requires-add-imports" group="note" /> |