-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Tetris game usually have "walls" on the right and left to prevent the shapes from going beyond the game. Currently this repo doesn't have that.
Existing
If a user keeps pressing arrow right, the shape will keep moving to the right until if disappears from canvas view.
Expected
If a user keeps pressing arrow right, the shape will move to the right until it collides with the side of canvas only, no further.
Task
In the event listened inside createShape() add if statement to prevent the increment/decrement of positionX if it goes below 0 or above the canvas width.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels