Struct cetkaik_yhuap_move_candidates::absolute::Field
source · pub struct Field {
pub board: HashMap<Coord, Piece, RandomState>,
pub a_side_hop1zuo1: Vec<NonTam2Piece, Global>,
pub ia_side_hop1zuo1: Vec<NonTam2Piece, Global>,
}
Expand description
Describes the field, which is defined as a board plus each side’s hop1zuo1. /フィールドを表す。フィールドとは、盤に両者の手駒を加えたものである。
Fields§
§board: HashMap<Coord, Piece, RandomState>
board/盤
a_side_hop1zuo1: Vec<NonTam2Piece, Global>
hop1zuo1 for the ASide/A側の手駒
ia_side_hop1zuo1: Vec<NonTam2Piece, Global>
hop1zuo1 for the IASide/IA側の手駒
Implementations§
source§impl Field
impl Field
sourcepub fn insert_nontam_piece_into_hop1zuo1(
&mut self,
color: Color,
prof: Profession,
side: Side
)
pub fn insert_nontam_piece_into_hop1zuo1(
&mut self,
color: Color,
prof: Profession,
side: Side
)
Add a piece to one’s hop1zuo1. /手駒に駒を追加する。
sourcepub fn find_and_remove_piece_from_hop1zuo1(
&self,
color: Color,
prof: Profession,
side: Side
) -> Option<Field>
pub fn find_and_remove_piece_from_hop1zuo1(
&self,
color: Color,
prof: Profession,
side: Side
) -> Option<Field>
Remove a specified piece from one’s hop1zuo1; if none is found, return None
.
/手駒から指定の駒を削除する。見当たらないなら None
。
Trait Implementations§
source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Field
impl Serialize for Field
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