Add serialization to String
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Clone)]
|
||||
enum Color {
|
||||
pub enum Color {
|
||||
Black,
|
||||
White,
|
||||
}
|
||||
@@ -29,8 +29,8 @@ impl Color {
|
||||
|
||||
#[derive(PartialEq, Eq, Hash, Clone)]
|
||||
pub struct Position {
|
||||
rank: Rank,
|
||||
file: File,
|
||||
pub rank: Rank,
|
||||
pub file: File,
|
||||
}
|
||||
|
||||
impl Position {
|
||||
@@ -82,7 +82,7 @@ pub enum File {
|
||||
H,
|
||||
}
|
||||
|
||||
trait GridAxis
|
||||
pub trait GridAxis
|
||||
where
|
||||
Self: Sized,
|
||||
Self: Clone,
|
||||
@@ -174,8 +174,8 @@ impl PieceType {
|
||||
}
|
||||
|
||||
pub struct Piece {
|
||||
color: Color,
|
||||
piece_type: PieceType,
|
||||
pub color: Color,
|
||||
pub piece_type: PieceType,
|
||||
}
|
||||
|
||||
impl Piece {
|
||||
|
||||
Reference in New Issue
Block a user