Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Welcome to the Stanford Karel IDE.
- * This is a free space for you to
- * write any Karel program you want.
- * Address: http://stanford.edu/~cpiech/karel/ide.html
- **/
- function main(){
- //your code here
- checkBoardPattern();
- checkBoardPattern();
- putBeeper();
- turningLeft();
- checkBoardPatternForEven();
- checkBoardPatternForEven();
- turningRight();
- checkBoardPattern();
- checkBoardPattern();
- putBeeper();
- turningLeft();
- checkBoardPatternForEven();
- checkBoardPatternForEven();
- turningRight();
- checkBoardPattern();
- checkBoardPattern();
- putBeeper();
- }
- function checkBoardPattern() {
- putBeeper();
- move();
- move();
- }
- function checkBoardPatternForEven() {
- move();
- putBeeper();
- move();
- }
- function turningLeft() {
- turnLeft();
- move();
- turnLeft();
- }
- function turningRight() {
- turnRight();
- move();
- turnRight();
- }
Advertisement
Add Comment
Please, Sign In to add comment