Closed metal-pony closed 1 year ago
~Fixed by sparklicorn/tetris-ai#3~
~This was resolved inadvertently during the last stretches of refactoring.~
edit: Re-opening. It appeared to have been fixed, but that is incorrect. The issue was seen in other drivers as well (GenericRankerEvolver
). The defect occurs when using ShapeQueue
concurrently. Recent changes to BunchOfGames
made it so the games ran effectively in sequence, so the defect was obscured.
The issue seems to be that ShapeQueue#SHAPES
is static, and instances are trying to shuffle it concurrently when generating next elements.
The immediate fix is to revert SHAPES
to an instance member.
Manual testing results:
This runner is only playing the game using a single shape, as seen below. This could be an issue with
ShapeQueue
or the method of populating them. Also look into why there is a blank panel in the second row and either fix it if trivial or create another issue.