|
@@ -75,8 +75,8 @@ func NewRemote(width, height int) *Board {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
answers := 0
|
|
answers := 0
|
|
|
- for regionWidthNum*regionHeightNum > answers {
|
|
|
|
|
|
|
|
|
|
|
|
+ for answers < regionWidthNum*regionHeightNum {
|
|
|
result := <-returnChan
|
|
result := <-returnChan
|
|
|
|
|
|
|
|
fmt.Printf("Received partial: x=%v, y=%v", result.x, result.y)
|
|
fmt.Printf("Received partial: x=%v, y=%v", result.x, result.y)
|
|
@@ -84,13 +84,12 @@ func NewRemote(width, height int) *Board {
|
|
|
index := result.x + (result.y+ry)*b.Width
|
|
index := result.x + (result.y+ry)*b.Width
|
|
|
fmt.Printf("index=%v\n", index)
|
|
fmt.Printf("index=%v\n", index)
|
|
|
i := index / 4 // tiles per byte
|
|
i := index / 4 // tiles per byte
|
|
|
- ba := make([]byte, regionWidth/4)
|
|
|
|
|
- result.boardTile.Read(ba)
|
|
|
|
|
- for _, v := range ba {
|
|
|
|
|
|
|
+ result.boardTile.Read(b.data[i:i+regionWidth/4])
|
|
|
|
|
+ for _, v := range b.data[i:i+regionWidth/4] {
|
|
|
fmt.Printf("%b ", v)
|
|
fmt.Printf("%b ", v)
|
|
|
}
|
|
}
|
|
|
fmt.Println()
|
|
fmt.Println()
|
|
|
- copy(b.data[i:i+regionWidth/4], ba)
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
answers++
|
|
answers++
|
|
|
}
|
|
}
|