eraether / WatchWordBot

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

Fix incorrect card numbers assigned at beginning of game #6

Closed cevn closed 8 years ago

cevn commented 8 years ago

Fixes #4

eraether commented 8 years ago

Hi Sameer,

please restore the visibility modifiers in Faction.java and BuildableWatchWordGrid.java.

Also, your commit changes the behavior of BuildableWatchWordGrid.randomlyAssign() slightly. The old behavior was to call fillRemainder(faction) if count was higher than the number of unassigned tiles. The new behavior would be an index out of bounds exception.

Looks good otherwise!

cevn commented 8 years ago

The count shouldn't be higher than unassigned tiles. Unassigned tile indices should be empty after randomlyAssign() finishes executing. If it isn't, that's a bug.

Having public everywhere is unnecessary, but I'll add them back in for your mental health.