Add comment to make sure random spawns are always same color.
This commit is contained in:
parent
b69d768b13
commit
021b363822
1 changed files with 3 additions and 0 deletions
|
|
@ -95,6 +95,9 @@ func (r *StandardRuleset) placeSnakesFixed(b *BoardState) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *StandardRuleset) placeSnakesRandomly(b *BoardState) error {
|
func (r *StandardRuleset) placeSnakesRandomly(b *BoardState) error {
|
||||||
|
|
||||||
|
// TODO: Always place on all black or all white squares
|
||||||
|
|
||||||
for i := 0; i < len(b.Snakes); i++ {
|
for i := 0; i < len(b.Snakes); i++ {
|
||||||
unoccupiedPoints := r.getUnoccupiedPoints(b)
|
unoccupiedPoints := r.getUnoccupiedPoints(b)
|
||||||
if len(unoccupiedPoints) <= 0 {
|
if len(unoccupiedPoints) <= 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue