Referenced from lesson Player Animation

For each of the challenges below, see if you can come up with two EXAMPLEs of how it should work!

1) Warping - Program one key to "warp" the player to a set location, such as the center of the screen.

(EXAMPLE (update-player ) )

(EXAMPLE (update-player ) )

2) Boundaries - Change update-player such that PLAYER cannot move off the top or bottom of the screen.

(EXAMPLE (update-player ) )

(EXAMPLE (update-player ) )

3) Wrapping - Add code to update-player such that when PLAYER moves to the top of the screen, it reappears at the bottom, and vice versa.

(EXAMPLE (update-player ) )

(EXAMPLE (update-player ) )

4) Hiding - Add a key that will make PLAYER seem to disappear, and reappear when the same key is pressed again.

(EXAMPLE (update-player ) )

(EXAMPLE (update-player ) )

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Algebra by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.