AndyDentFree / rbstuff

Automatically exported from code.google.com/p/rbstuff
2 stars 0 forks source link

Karel Commands #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There are a couple of Karel commands which I think may not currently be present 
in rbKarel. These can be found on 
page 18 in the pdf at 
http://people.reed.edu/~jerry/121/materials/karellearnsjava.pdf but I'll list 
them below:

Test | Opposite | What it checks
beepersPresent() noBeepersPresent() Are there beepers on this corner?
beepersInBag() noBeepersInBag() Any there beepers in Karel’s bag?

What version of the product are you using? On what operating system?

r43

Please provide any additional information below.

Original issue reported on code.google.com by jeffreya...@gmail.com on 28 Apr 2009 at 2:16

GoogleCodeExporter commented 9 years ago
These are variants on the original syntax which IS implemented:
  * noBeepersInBeeperBag
  * anyBeepersInBeeperBag
  * nextToABeeper
  * notNextToABeeper

Do you want to 
a) add the new commands and keep the old ones, for compatibility, 
b) leave as is
c) rename old commands

Original comment by dentaroo@gmail.com on 28 Apr 2009 at 2:38

GoogleCodeExporter commented 9 years ago
Personally I think it would be good to go with the syntax they are currently 
using in the course at Stanford which is:

Test | Opposite | What it checks
frontIsClear() frontIsBlocked() Is there a wall in front of Karel?
leftIsClear() leftIsBlocked() Is there a wall to Karel’s left?
rightIsClear() rightIsBlocked() Is there a wall to Karel’s right?
beepersPresent() noBeepersPresent() Are there beepers on this corner?
beepersInBag() noBeepersInBag() Any there beepers in Karel’s bag?
facingNorth() notFacingNorth() Is Karel facing north?
facingEast() notFacingEast() Is Karel facing east?
facingSouth() notFacingSouth() Is Karel facing south?
facingWest() notFacingWest() Is Karel facing west?

Original comment by jeffreya...@gmail.com on 28 Apr 2009 at 4:52

GoogleCodeExporter commented 9 years ago
Yep, the Stanford syntax is what I used.

When in doubt, look at the public methods of KarelScripter to see all the 
available commands.
(Strictly speaking that includes the public commands in GraphicsScripter as 
well but they are a bit irrelevant 
until I solve Issue 19 as your graphics are erased).

Also note that looking at the public commands in KarelWorld tells you what can 
be used in a world script 
although it doesn't make it clear which ones should be skipped - I've had some 
ideas about generating help in 
Issue 33 using attributes.

Original comment by dentaroo@gmail.com on 1 May 2009 at 12:13

GoogleCodeExporter commented 9 years ago
Nothing to fix - sticking with the Stanford syntax which is already fully 
implemented.

Original comment by dentaroo@gmail.com on 2 May 2009 at 4:49