So far, I think I’ve made a lot of progress on top of what I did last week. I’m also gradually completing my projects according to the schedule and the list of milestones I set up earlier.
General list of milestones
- At least one external data file
- Dictionaries
- Custom modules
- Definite
(for)
loops - Custom functions
- Have a graphical interface, responding to click events
- Consistently available help dialog
- Display information about programs state
- Have at least 3 levels
- Extend a custom turtle class
- Have a ‘win’ screen
- Have an iterative interface
- Use on or more custom images
## List of milestones that I have achieved last week
- Improved game interface, added the function of dispalying scores
- Added block move, drop function
- Added the function of eliminate a row and get the score
- Added the function of increasing the score and difficulty when a row is completed
- Added the function of changing directions of block, pausing block and changing shapes of block
This is my current program
Reflection
- When I first designed the rotate block feature, I didn’t have a clue at first. Because I was able to move the block up, down, left, and right very smoothly by simply increasing or decreasing the coordinates of the block. But when designing the rotation, I couldn’t simply add or subtract coordinates. After reviewing a lot of materials, I found that I could implement the following code, which immediately opened my mind.
(active_block_index + 1) % len(active_block.tiles)
- I think my milestones are ambitious enough. Last week I not only completed the original level 1, but also had great success in attempting level 2.
- I am able to keep to my plan. However, I encountered some unforeseen problems in completing my intended plan. I initially thought the function of restarting the game was too simple, thinking that I could just set up a loop, but after I finished the other functions, I found that I couldn’t get the restart to work. This required me to re-examine the entire code. Also my code was redundant in a main file, and I needed to reorganize my code into several modules.
What to do next
- Create one external data file and use dictionaries
- Add the function of restart the game
- Custom modules and reorganize codes
- Add one image
- Test whole game