2022-03-03 13:28:00 -05:00
|
|
|
package main
|
|
|
|
|
2022-03-07 13:13:34 -05:00
|
|
|
import "git.saintnet.tech/stryan/freego"
|
2022-03-03 13:28:00 -05:00
|
|
|
|
|
|
|
//type newGameReq struct{}
|
|
|
|
|
|
|
|
type newGameResp struct {
|
|
|
|
GameID int `json:"game_id"`
|
|
|
|
PlayerID string `json:"player_id"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type gameResp struct {
|
2022-03-07 16:14:30 -05:00
|
|
|
GameBoard [8][8]*ViewTile `json:"board"`
|
2022-03-03 13:28:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type gameStatusResp struct {
|
|
|
|
GameStatus freego.GameState `json:"game_status"`
|
|
|
|
Move int `json:"move"`
|
|
|
|
}
|
2022-03-07 14:47:21 -05:00
|
|
|
|
|
|
|
type gameMovePostReq struct {
|
2022-03-08 16:11:15 -05:00
|
|
|
Move string `json:"move"`
|
2022-03-07 14:47:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type gameMovePostRes struct {
|
|
|
|
Valid bool `json:"valid"`
|
|
|
|
Result bool `json:"result"`
|
|
|
|
Parsed string `json:"parsed"`
|
|
|
|
Error error `json:"error"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type gameMoveRes struct {
|
|
|
|
Move string `json:"move"`
|
|
|
|
}
|