sir-lancebot icon indicating copy to clipboard operation
sir-lancebot copied to clipboard

False hints in snakes antidote game

Open DanteBM opened this issue 4 years ago • 1 comments

Description

Citing the rules of the game

Rules: You have 4 ingredients for each antidote, you only have 10 attempts Once you synthesize the antidote, you will be presented with 4 markers Tick: This means you have a CORRECT ingredient in the CORRECT position Circle: This means you have a CORRECT ingredient in the WRONG position Cross: This means you have a WRONG ingredient in the WRONG position

Info: The game automatically ends after 5 minutes inactivity. You should only use each ingredient once.

This is a screenshot of my first three guesses. Captura de pantalla de 2021-08-27 18-09-37

Description of each guess:

  1. Random guess. It turns out that I got all the correct ingredients, and even the correct position for the last two ingredients. If I switch positions of the first two ingredients I should won the game
  2. Switched the first two ingredients, but it appears that the last ingredient is the only one correct and in the correct position
  3. Testing the fifth available ingredient, that shouldn't be part of the antidote, but it seems it is. Moreover, my last ingredient that was the only one correct and in the correct position is now not even a correct ingredient

Something doesn't add up

Steps to Reproduce

Play the game normally in sir-lancebot-playground channel

Expected Behaviour

Winning the game

Actual Behaviour

Wrong guess

Known Impacted Platforms

  • [x] Web
  • [x] Desktop
  • [x] Android App
  • [x] iOS App

Possible Solutions

I believe the error is sorting the guess_result list because the position info is thrown away https://github.com/python-discord/sir-lancebot/blob/05ba3de5c99b30a8eba393da1460fae255373457/bot/exts/evergreen/snakes/_snakes_cog.py#L531-L539

Would you like to implement a fix?

Note: For high-priority or critical bugs, fixes may be implemented by staff.

  • [ ] I'd like to implement the bug fix
  • [x] Anyone can implement the bug fix

DanteBM avatar Aug 28 '21 01:08 DanteBM

I believe this is intended behaviour. The tick means you have a correct ingredient in it's correct position, but the position of the tick doesn't indicate anything, so you don't know which ingredient you have in the correct position. This makes the game more interesting, as the strategy for it is less simple.

You can see that the position of the result emojis (white circle, tick, cross) is sorted in the code (guess_result.sort()) in order to not give the position away, hence you get the results you did.

That said, the current help embed doesn't make this very clear, so a line could be added to clarify this behaviour

wookie184 avatar Aug 28 '21 12:08 wookie184