pub enum Piece {
Tam2,
NonTam2Piece {
color: Color,
prof: Profession,
side: Side,
},
}
Expand description
Describes a piece on the board. /盤上に存在できる駒を表現する。
Variants§
Tam2
Tam2, a special piece belonging to both sides. Both players can move it. /皇(たむ)。自分も相手も動かすことができる共有の駒である。
NonTam2Piece
Fields
§
prof: Profession
profession of the piece/駒の職種
All the other usual pieces that belong to a single side. /残りの全ての普通の駒。片方の陣営にのみ属する。
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Piece
impl<'de> Deserialize<'de> for Piece
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Piece, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Piece, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Piece
impl Serialize for Piece
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more