Преглед на файлове

Added total width and height

Ronald Peterson преди 10 години
родител
ревизия
97c60ee014
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      board/board.go

+ 3 - 3
board/board.go

@@ -54,7 +54,7 @@ func New(width, height int) *Board {
 				width:  regionWidth,
 				height: regionHieght,
 			}
-			go genRegion(gbt, returnChan)
+			go b.genRegion(gbt, returnChan)
 		}
 	}
 
@@ -85,8 +85,8 @@ func New(width, height int) *Board {
 	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)
 	resp, _ := http.Get(requestUrl)