| |
examples: if
Text// Check if next square is empty before stepping:
- void go()
- {
- if(Tracer.seenowall())
- {
- // do this only if next square is clear
- Tracer.step();
- }
- }
-
- or...
void go()
{
- if(Tracer.seenowall())
- {
- // do this only if next square is clear
- Tracer.mark(4);
- Tracer.step();
- Tracer.say("OK");
- }
- }
|