robot_olympics
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| robot_olympics [2019/08/17 23:48] – created frchris | robot_olympics [2019/08/18 12:41] (current) – frchris | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Karel is practicing for the Robot Olympics. | Karel is practicing for the Robot Olympics. | ||
| race requires karel to move around two beepers in a figure 8 pattern. | race requires karel to move around two beepers in a figure 8 pattern. | ||
| + | <code java> | ||
| + | import java.awt.Color; | ||
| + | import kareltherobot.*; | ||
| + | public class Olympics implements Directions | ||
| + | { | ||
| + | public static void main(String[] args) | ||
| + | { | ||
| + | World.setDelay(30); | ||
| + | World.setSize(6, | ||
| + | World.setBeeperColor(Color.CYAN); | ||
| + | World.placeBeepers(4, | ||
| + | World.placeBeepers(2, | ||
| + | World.setVisible(); | ||
| + | task(); | ||
| + | } | ||
| + | public static void task() | ||
| + | { | ||
| + | Robot karel = new Robot(1, | ||
| + | // Your code here | ||
| + | karel.turnOff(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | {{:: | ||
| + | |||
| + | [[http:// | ||
| + | |||
robot_olympics.1566100139.txt.gz · Last modified: 2019/08/17 23:48 by frchris