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.
examples:
update-player( ) is
update-player( ) is
end
2 Boundaries - Change update-player
such that PLAYER
cannot move off the top or bottom of the screen.
examples:
update-player( ) is
update-player( ) is
end
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.
examples:
update-player( ) is
update-player( ) is
end
4 Hiding - Add a key that will make PLAYER
seem to disappear, and reappear when the same key is pressed again.
examples:
update-player( ) is
update-player( ) is
end
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap 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.