signebedi / coliseum

simple, turn-based, in your TTY
MIT License
2 stars 1 forks source link

[Bug] need to reload (some) tournament data each time Player.tournament() is run #3

Closed signebedi closed 2 years ago

signebedi commented 3 years ago

Right now, tournament data persists after a tournament is fought. If a player loses a tournament and tries it again later, the enemy HP will reflect the last run through. If a player wins a tournament and wants to play it again, the same problem occurs.

Reload coliseum.tournaments unconditionally each time to avoid this issue.

https://github.com/signebedi/coliseum/blob/65a09c7930eb7f2ed08380a724b2cba4c5f8481a/src/coliseum/player.py#L86-L87

signebedi commented 2 years ago

Fixed in 3b79c438dbe1b426f62c0a2155a869e6a17a9fbe, see https://github.com/signebedi/coliseum/commit/3b79c438dbe1b426f62c0a2155a869e6a17a9fbe#r43552334.