Algorithm:
- Include all standard libraries
- Create sprite for central piece
- Create a class for sprite
- Positioning
- Changes in x position for sprite
- Changes in y position for blocks
- Create a for loop
- User input
- When the right half of the screen is touched, the sprite moves to the right
- When the left half of the screen is touched, the sprite moves to the left
- Block Generation
- Create a set amount of blocks
- Create classes for each block
- Randomize block placement
- Guarantee big enough gap to get through blocks
- Movement of blocks down the screen
- Home Screen
- Create touch sensitive area using LCD touch
- Touch sensitive area sends the user to a different screen
- Start game
- Access stats
- Declare variables
- Assign current score
- High score
- If current score >= best run score
- Number of deaths
- Every collision adds one to deaths
- Look at Rules
- Credits
- Collisions
- Have a for look checking the positions of border pixels of the sprite before every screen refresh
- Have a loop checking the positions of the objects
- In case of collision
- Display “you died”
- Increment deaths
- Return to home screen