ForNeVeR / O21

FOSS remake of U95, an old submarine arcade game from 1995.
MIT License
19 stars 9 forks source link

Preserve player direction even if player stops #129

Closed ForNeVeR closed 1 year ago

ForNeVeR commented 1 year ago

Currently, we determine Player.Direction by the player velocity, and if the velocity is zero, then it defaults to Right.

We should preserve the last direction when the player stops.

See TODO[#xxx] in the code.

Fantoom commented 1 year ago

What about mutable field with previous direction value in Player type?

ForNeVeR commented 1 year ago

No mutable fields, the whole game engine should be immutable.