eraether / WatchWordBot

A slack bot that plays the game WatchWords
MIT License
3 stars 4 forks source link

Incorrect number of red/blue/neutral cards #4

Closed cevn closed 8 years ago

cevn commented 8 years ago

Today, we've played multiple games where blue has had 5-6 cards when red has had 2 or more over them. Maybe the bug is around here somewhere? https://github.com/eraether/WatchWordBot/blob/master/src/main/java/com/raether/watchwordbot/BuildableWatchWordGrid.java#L38-L43

eraether commented 8 years ago

Yep, the issue is that the List unassignedTileIndicies = getUnassignedTileIndicies(); is outside the while loop, so it is likely to reassign cards to the same index. Putting it inside the while loop should fix the issue.