|
|
@@ -39,7 +39,7 @@ func createGameHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Par
|
|
|
}
|
|
|
|
|
|
func gameHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
|
|
-
|
|
|
+
|
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
|
}
|
|
|
|
|
|
@@ -52,11 +52,11 @@ func moveHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
|
|
}
|
|
|
|
|
|
// Request params: x={x}&y={y}&rows={rows}&cols={cols}
|
|
|
-func boardHandler(w http.ResponseWriter, req *http.Request) {
|
|
|
- x, _ := atoi(req.FormValue("x"))
|
|
|
- y, _ := atoi(req.FormValue("y"))
|
|
|
- rows, _ := atoi(req.FormValue("rows"))
|
|
|
- cols, _ := atoi(req.FormValue("cols"))
|
|
|
+func boardHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
|
|
|
+ //x, _ := strconv.Atoi(req.FormValue("x"))
|
|
|
+ //y, _ := strconv.Atoi(req.FormValue("y"))
|
|
|
+ //rows, _ := strconv.Atoi(req.FormValue("rows"))
|
|
|
+ //cols, _ := strconv.Atoi(req.FormValue("cols"))
|
|
|
b := board.New(56, 35)
|
|
|
w.Header().Set("Content-Type", "text/plain;charset=utf-8")
|
|
|
b.WriteJSON(w)
|