RedHat-Israel / ROSE

ROSE project car race game
GNU General Public License v2.0
34 stars 125 forks source link

Use positive logic when calculating score #476

Closed yaacov closed 1 year ago

yaacov commented 1 year ago

Issue: In our score code we use refactored logic that does not explicitly follow the documented rules.

For example, when calculating the players score we use negative logic, e.g. player.action != actions.BRAKE , while in the documentation we define the rules using positive language, e.g. if you want to continue forward. return actions.RIGHT or actions.LEFT if you like to bypass the obstacle.

There are reasons why you might want to follow the document's logic explicitly rather than refactoring it:

In our case, ROSE is intended as educational code for students learning to code, it makes sense to write the score code to explicitly follow the documented rules.

What are the updates proposed by this PR:

Possible bug fixes:

Ref: https://github.com/RedHat-Israel/ROSE/tree/master/examples

yaacov commented 1 year ago

@nirs @sleviim hi, can you review / refer to a reviewer ?