toJson method
Converts insanichess.PieceColor to json representation.
Implementation
String toJson() {
switch (this) {
case insanichess.PieceColor.white:
return 'w';
case insanichess.PieceColor.black:
return 'b';
}
}
Converts insanichess.PieceColor to json representation.
String toJson() {
switch (this) {
case insanichess.PieceColor.white:
return 'w';
case insanichess.PieceColor.black:
return 'b';
}
}