Python Forum
[PyGame] Mouse Click Problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Mouse Click Problem
#2
We would need the full code to run it ourselves.

Where did you get this code from? This appears to be using multiple states, but in a very bad way.
while thismodule.ending1:
while thismodule.ending4:

In this tutorial we explained that this code structure is asking for trouble and confusion, especially across modules. There should never be more than one game loop regardless of how many states you have. Here is a proper example of a state machine.

Also if its just a Sudoku puzzle, i dont see why you would need different states in the first place. You would just update the block. You would not need a different state unless your doing something else more complicated.
Recommended Tutorials:
Reply


Messages In This Thread
Mouse Click Problem - by rwahdan - Jul-08-2019, 06:50 AM
RE: Mouse Click Problem - by metulburr - Jul-08-2019, 11:41 AM
RE: Mouse Click Problem - by Windspar - Jul-08-2019, 02:12 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020