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 BS:Games by Jen Poole, Emmanuel Schanzer, Ed Campos Jr, and Dorai Sitaram is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.