Closed effa closed 7 years ago
I agree with "replacing it by separate left(), right() and ahead() command". I also agree with "shooting option is somewhat ad-hoc" (and also there is shot X shoot confusion, at least for me). What about shoot() without moving? That would be natural (in my opinion). Are there any problems with it? (limits on the number of commands?)
Concerning shooting without movement, I originally wanted to avoid this, because I thought that:
However, I see that combining movement and shooting into a single command is not elegant (at least not the way it's done now) and using separate commands is probably easier and less confusing.
left()
, right()
and ahead()
shoot()
The current language description states that move()
command gets a parameter of the form [direction[+action]]
, but the command move('right+shot')
raises an error Undefined command right+shot
.
I would add also a command to check whether there is an asteroid/meteor/... in front of the spaceship and energy/battery limiting using move('ahead+shot')
instead of move()
(I could also collect something to charge battery to be able to shoot).
How should the language look like?
According to me, the important criteria are:
(Are there another important criteria?)
These criteria are sometimes conflicting and I am not sure about importance of individual criteria.
After the initial tries, the
move()
command seems to be too verbose. So I am considering replacing it by separateleft()
,right()
andahead()
command. On the other hand, for the blocks version, the full versionmove(ahead|left|right|ahead+shot)
seems more expressive and the blocks brevity is the same. Also, the shooting option is somewhat ad-hoc, so if you have any suggestion on how to make it cleaner, please share.