mchess-server/types/shortname.go

17 lines
344 B
Go
Raw Normal View History

2023-06-25 14:11:29 +00:00
package types
2023-07-03 17:32:39 +00:00
type PieceShortName string
2023-06-25 14:11:29 +00:00
const (
2023-07-03 17:32:39 +00:00
PawnShortName PieceShortName = "p"
RookShortName PieceShortName = "r"
KnightShortName PieceShortName = "n"
BishopShortName PieceShortName = "b"
QueenShortName PieceShortName = "q"
KingShortName PieceShortName = "k"
2023-06-25 14:11:29 +00:00
)
2023-07-03 17:32:39 +00:00
func (p PieceShortName) String() string {
return string(p)
}