Skip to content

Conversation

@AliceLR
Copy link
Owner

@AliceLR AliceLR commented May 21, 2025

Probably do not merge until 2.94 due to how sketchy this is.

  • The blocked array update flag is now cleared when the blocked array is updated (compatibility for 2.80 until 2.94).
  • The blocked array update flag is now set for DUPLICATE SELF XY and DUPLICATE SELF DIR (compatibility for 2.80 until 2.94).
  • SPITFIRE, SHOOTSEEKER, and SHOOTMISSILE now set the blocked array update flag instead of manually recalculating it (compatibility for 2.83 until 2.94).
  • IF DIR OF PLAYER now uses the player's blocked status instead of the current robot's (compatibility for 1.x until 2.94).
  • find_player() is no longer called in run_robot() unless the blocked array update flag is set.

TODO:

  • SET/INC/DEC/SET RANDOM/INC RANDOM/DEC RANDOM/MULTIPLY/DIVIDE/MODULO/DOUBLE/HALF need to set update_blocked if they write to a board counter.
  • Prove beyond any doubt that it's safe to move find_player() back into the update_blocked branch for all version variants. This is probably true, but it's the most dangerous change in this patch.
  • Regression tests:
    • 1.00 if testable.
    • 2.00
    • 2.80
    • 2.83
    • 2.94
  • Changelog entries.

Probably do not merge until 2.94 due to how sketchy this is.

* The blocked array update flag is now cleared when the
  blocked array is updated (compatibility for 2.80 until 2.94).
* The blocked array update flag is now set for DUPLICATE SELF XY
  and DUPLICATE SELF DIR (compatibility for 2.80 until 2.94).
* SPITFIRE, SHOOTSEEKER, and SHOOTMISSILE now set the blocked
  array update flag instead of manually recalculating it
  (compatibility for 2.83 until 2.94).
* IF DIR OF PLAYER now uses the player's blocked status instead
  of the current robot's (compatibility for 1.x until 2.94).
* find_player() is no longer called in run_robot() unless the
  blocked array update flag is set.

TODO:

* Some kind of fix for SET/INC/DEC et al. changing the board but
  not setting update_blocked.
* Changelog entries pre-2.94 if this gets merged before then.
* Regression tests (several of them).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant