v0.2.0 transitioned to api-only, extended and improved features, docs and tests added

This commit is contained in:
2025-10-29 23:28:19 -04:00
parent b98ea83012
commit 0ad608293e
32 changed files with 3683 additions and 1670 deletions

35
internal/core/state.go Normal file
View File

@ -0,0 +1,35 @@
// FILE: internal/core/core.go
package core
type State int
const (
StateOngoing State = iota
StatePending // Computer is calculating a move
StateStuck // Computer is calculating a move
StateWhiteWins
StateBlackWins
StateDraw
StateStalemate
)
func (s State) String() string {
switch s {
case StatePending:
return "pending"
case StateStuck:
return "stuck"
case StateWhiteWins:
return "white wins"
case StateBlackWins:
return "black wins"
case StateDraw:
return "draw"
case StateStalemate:
return "stalemate"
case StateOngoing:
return "ongoing"
default:
return "unknown"
}
}