1. Test the setDirection() method with the following inputs and complete the table, giving the compass direction each input represents. |
| ||||||||||||||||||||
2. Move a bug to a different location using themoveTo() method. In which directions can you move it? How far can you move it? What happens if you try to move the bug outside the grid? | You can move it anywhere on the grid, or you'll get an error message, you have to supply it with the column and row. | ||||||||||||||||||||
3. Change the color of a bug, a flower, and a rock. Which method did you use? | setColor() | ||||||||||||||||||||
4. Move a rock on top of a bug and then move the rock again. What happened to the bug? | The bug became invisible, or it disappeared. |
יום שני, 14 בפברואר 2011
Gridworld: Part1: Exercises page 8
הירשם ל-
תגובות לפרסום (Atom)
אין תגובות:
הוסף רשומת תגובה