|
@@ -54,7 +54,7 @@ func New(width, height int) *Board {
|
|
|
width: regionWidth,
|
|
width: regionWidth,
|
|
|
height: regionHieght,
|
|
height: regionHieght,
|
|
|
}
|
|
}
|
|
|
- go genRegion(gbt, returnChan)
|
|
|
|
|
|
|
+ go b.genRegion(gbt, returnChan)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -85,8 +85,8 @@ func New(width, height int) *Board {
|
|
|
return b
|
|
return b
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func genRegion(req req, responseChan chan response) {
|
|
|
|
|
- requestUrl := fmt.Sprintf("http://localhost:8080/&width=%v&height=%v&x=%v&y=%v", req.width, req.height, req.x, req.y)
|
|
|
|
|
|
|
+func (b *Board) genRegion(req req, responseChan chan response) {
|
|
|
|
|
+ requestUrl := fmt.Sprintf("http://localhost:8081/?totalWidth=%v&totalHeight=%vwidth=%v&height=%v&x=%v&y=%v", b.Cols, b.Rows, req.width, req.height, req.x, req.y)
|
|
|
log.Printf("Requested generation of tile with url: %v\n", requestUrl)
|
|
log.Printf("Requested generation of tile with url: %v\n", requestUrl)
|
|
|
resp, _ := http.Get(requestUrl)
|
|
resp, _ := http.Get(requestUrl)
|
|
|
|
|
|