@@ -61,10 +61,12 @@ func (b *Board) WriteJSON(w io.Writer, startCol, startRow, cols, rows int) {
for y := startRow; y < sr+rows; y++ {
for x := startCol; x < sc+cols; x++ {
+ if (x != startCol) {
+ w.Write([]byte{','})
+ }
t := &jsonTile{x, y, b.Get(x, y).Name(), ""}
bs, _ := json.Marshal(t)
w.Write(bs)
- w.Write([]byte{','})
}