Skip to content

Commit

Permalink
fixed board printing loop
Browse files Browse the repository at this point in the history
  • Loading branch information
rimaulana committed May 7, 2018
1 parent d75e09a commit 758816a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions board/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"
)

// Board defined the stuct of board
// Board defined the struct of board
type Board struct {
Size int
Data *[][]int
Expand Down Expand Up @@ -113,7 +113,7 @@ func (brd *Board) Draw() string {
pick := brd.RandomGenerator.Perm(len(*brd.Data))
sample = pick[:brd.Sample]
}
for key := range sample {
for _, key := range sample {
result += header(brd.Size)
for j := 0; j < len((*brd.Data)[key]); j++ {
result += row(brd.Size, (*brd.Data)[key][j])
Expand Down

0 comments on commit 758816a

Please sign in to comment.