Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultKillTimeout = time.Hour
View Source
const (
StartingFEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateFischerRandomFEN ¶ added in v1.6.1
func GenerateFischerRandomFEN() string
func GenerateID ¶ added in v1.2.1
func GetInternalPuzzles ¶ added in v1.2.1
func GetInternalPuzzles() []string
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
type SessionMgr ¶
type SessionMgr struct {
// contains filtered or unexported fields
}
func NewSessionMgr ¶
func NewSessionMgr(redisURL string, killTimeout time.Duration) *SessionMgr
func (*SessionMgr) CreateSession ¶ added in v1.3.1
func (mgr *SessionMgr) CreateSession(game string) (string, error)
func (*SessionMgr) MoveHistoryToGIF ¶ added in v1.6.1
func (mgr *SessionMgr) MoveHistoryToGIF(w io.Writer, roomID string) error
func (*SessionMgr) ServeRPC ¶ added in v1.6.1
func (mgr *SessionMgr) ServeRPC(w http.ResponseWriter, r *http.Request, roomID string)
type Update ¶
type Update struct { Move Move `json:"move,omitempty"` Turn string `json:"turn"` Status string `json:"status"` FEN string `json:"fen,omitempty"` PGN string `json:"pgn,omitempty"` Opening string `json:"opening,omitempty"` IsCapture bool `json:"isCapture"` IsGameOver bool `json:"isGameOver"` CheckedSquare string `json:"checkedSquare,omitempty"` }
Click to show internal directories.
Click to hide internal directories.