SHARE
TWEET

CodeHS | 2.16.4 - Escape Karel

470m May 19th, 2017 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function start(){
  2.     findHole();
  3. }
  4. function findHole(){
  5.    
  6.     while (rightIsBlocked()){
  7.         move();
  8.         move();
  9.         move();
  10.         move();
  11.         turnLeft();
  12.     }
  13.    
  14.     if (rightIsClear()){
  15.         turnRight();
  16.         move();
  17.     }
  18. }
RAW Paste Data
Top