v0.13.1 concession management and record, clients update, version report
test / test (push) Canceled after 0s
test / test (push) Canceled after 0s
This commit is contained in:
1 parent
f1ac4cbbe7
commit
6e8d80c788
30 files changed
+704
-81
No files matched your search
@@ -91,6 +91,13 @@ func (t Termination) ValidFor(s State) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// IsConcession reports whether the players chose the result: a resignation or
|
||||
// a draw by agreement. A concession is final when both sides are human; against
|
||||
// the computer play may continue, and the first concession stays on record.
|
||||
func (t Termination) IsConcession() bool {
|
||||
return t == TermResignation || t == TermAgreement
|
||||
}
|
||||
|
||||
// ParseColor accepts "w", "b", "white", or "black"; anything else is zero.
|
||||
func ParseColor(s string) Color {
|
||||
switch s {
|
||||
|
||||
Reference in new issue
Block a user