Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug in win check for gameType divided_screen #7

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

jriyyya
Copy link
Contributor

@jriyyya jriyyya commented Jun 21, 2023

Steps to reproduce:

  1. Play the gametype of correclty placing the cats, which is divided_screen
  2. In that gameType when the oddCats are to be placed to the left, Even if you place the cats correctly you won't have a win.

Reason:
It was checking for the evenCats on the left even though oddCats are to be checked.

- There were two different state for the divided screen gameplay
  One has the 'odd cats' message on right and the other one has to
  the left.

- The win check was not correctly checked for the gameplay when odd
  cats' message was on left.

- now there is a if condition which checks which gameplay is currently
  being played in divided_screen gametype, which then correctly checks
  the win for that gameplay
@jriyyya
Copy link
Contributor Author

jriyyya commented Jun 22, 2023

@chimosky Can you please review this bugfix

if cat.x > alloc.width // 2 and catsCount[cat.cat_id-1] % 2 == 0:
correctly_placed = False
break
if self.sides[0] == SideType.ODD:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this check?

@chimosky
Copy link
Member

Tested 57bfe0e, doesn't work as expected.

@quozl
Copy link

quozl commented Jun 23, 2023

Thanks. Another repository I wasn't watching. Your mention drew my attention. 😁

Tested the game logic;

  • 34bc5ba ("v2") works as expected,
  • 57bfe0e ("Fix Bug in win check for gameType divided_screen") works as expected,

"Classify each kind of cat as even or odd" is either deceptive or ambiguous. I'm not sure if that is intended, and if the translations have kept that intention. I would have expected something more in the fashion of direct instruction, mentioning colour rather than kind; like "For each colour of cat, classify according to the quantity parity, even or odd. Move cats into the marked areas by dragging them. The game ends when the timer expires. You win if all the classifications are correct."

However, this is rather long.

"Is the amount of cats on the screen even or odd?" is also a strange way to put it. Rather than amount, I'd use quantity or number.

These messages were initially written by a developer with English as a second language, and further work has mostly been by others who (from my memory) also had that advantage. Someone like me with the disadvantage of only English (and Elvish) may see things differently. 😬

@chimosky
Copy link
Member

chimosky commented Jun 24, 2023

"Classify each kind of cat as even or odd" is either deceptive or ambiguous. I'm not sure if that is intended, and if the translations have kept that intention. I would have expected something more in the fashion of direct instruction, mentioning colour rather than kind; like "For each colour of cat, classify according to the quantity parity, even or odd. Move cats into the marked areas by dragging them. The game ends when the timer expires. You win if all the
classifications are correct."

Agreed, it was confusing for me.

Opened #8 to track this.

@chimosky chimosky merged commit f49334a into sugarlabs:master Jun 24, 2023
@jriyyya jriyyya deleted the patch-bug-fix branch June 28, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants