hts.StevenWood.com

Karel 15

Home ] Up ] [ Karel 15 ] Karel 15a ] Karel 15b ] Karel 15c ] Karel 15d ] Boolean Logic ] CheckList ] Rubric ][ Last Page ]

Karel 15

Complete the following in class or for homework. Do NOT hand in your work unless other instructions were given.

1. Add to the capabilities of IfBot so that 
  1. it knows to turns green when facing south and white when facing north.
  2. before it moves it checks to see if a wall is in front. If it is clear, it moves otherwise, it stays put.
  3. if it is more than 10 streets from the origin it dies from home sickness.
  4. if it is more than 10 avenues from the origin it dies from home sickness.
  Check the documentation to see which methods will:
  • check to see if a wall is in front;
  • give you the street, and
  • give you the avenue.

Examine the Robot  documentation

 
 
Home ] Up ] [ Karel 15 ] Karel 15a ] Karel 15b ] Karel 15c ] Karel 15d ] Boolean Logic ] CheckList ] Rubric ][Last Page]
All material on this site is copyright © 1997- by Steven Wood or as credited. All right reserved. Use of this site indicates you agreement with the  terms of use.
Send comments or questions to about this page.
Every attempt has been made to credit work under copyright. If there are any claims that copyright has been missed please contact the .
+SDG+