PyGame QIX clone, filling areas
- by astropanic
I'm playing around with PyGame.
Now I'm trying to implement a QIX clone.
I have my game loop, and I can move the player (cursor) on the screen.
In QIX, the movment of the player leaves a trace (tail) on the screen, creating a polyline.
If the polyline with the screen boundaries creates a polygon, the area is filled.
How I can accomplish this behaviour ?
How store the tail in memory ?
How to detect when it build a closed shape that should be filled ?
I don't need an exact working solution, some pointers, algo names would be cool.