B:BD[
2.2064] → [
2.2064:2292]
for gridnum, grid := range b.grids {
for row, line := range grid {
for col, elem := range line {
if elem == item {
ret = append(ret, markData{gridnum, row, col})
// XXX: we should jump to the next grid
}
for gridnum := range b.grids {
if m, ok := b.findInGrid(gridnum, item); ok {
ret = append(ret, m)
}
}
return ret
}
func (b Bingo) findInGrid(gridnum int, item int) (markData, bool) {
for row, line := range b.grids[gridnum] {
for col, elem := range line {
if elem == item {
return markData{gridnum, row, col}, true