Re:Show HN: JSRobot – A platform game you play by coding in ...
by reacweb on Monday October 23, 2017 @04:40AM
(#15531664)
Or the action could be the return value. IMHO, trying to guess the physical model by experimentation is painful. Why not propose a debug button to display the state of variables during the execution of script.
[ Parent
| on HN ]
Re:Show HN: JSRobot – A platform game you play by coding in ...
by positivecomment on Monday October 23, 2017 @06:23AM
(#15532058)
Exactly, the function should not be responsible to see if robot.action has any existing value. It should just return an action depending on the state.