Maybe change input_ship_thruster(...) to use a Single<> to get the player ship #5

Open
opened 2025-07-29 09:29:15 -07:00 by robert · 0 comments
Owner

I didn't know about the Single<> constraint when I wrote the fn input_ship_thruster(...) system, so it still manually checks for there being just one single player ship. I could replace this with the Single<> constraint, but that will cause it to silently do nothing when the player ship count is != 1.

  • Pro: Shorter code that does basically the same thing
  • Con: invalid world setup does not cause a program panic
I didn't know about the `Single<>` constraint when I wrote the `fn input_ship_thruster(...)` system, so it still manually checks for there being just one single player ship. I could replace this with the `Single<>` constraint, but that will cause it to silently do nothing when the player ship count is != 1. - Pro: Shorter code that does basically the same thing - Con: invalid world setup does not cause a program panic
robert added this to the Finish the Game project 2025-07-29 09:29:15 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: robert/another-asteroids#5