pub enum Perspective {
IaIsDownAndPointsUpward,
IaIsUpAndPointsDownward,
}
Expand description
Defines a perspective, with which you can transform between the absolute and the relative /どちらの視点で見ているかを表現する型。 視点を固定すると、相対座標表現と絶対座標表現を相互変換することができる。
Variants§
IaIsDownAndPointsUpward
IA is the lowermost row; the player who had occupied the IA row in the beginning of the game has pieces that point upward (i.e. you) /IAは一番下の行であり、初期状態でIA行を占有していたプレイヤーは駒が上向き(=あなた)である。
IaIsUpAndPointsDownward
IA is the uppermost row; the player who had occupied the IA row in the beginning of the game has pieces that point downward (i.e. the opponent) /IAは一番上の行であり、初期状態でIA行を占有していたプレイヤーは駒が下向き(=相手)である。
Implementations§
source§impl Perspective
impl Perspective
sourcepub const fn ia_is_down(self) -> bool
pub const fn ia_is_down(self) -> bool
Check if IA is the lowermost row /IAが一番下の行であるかどうかを判定する
Trait Implementations§
source§impl Clone for Perspective
impl Clone for Perspective
source§fn clone(&self) -> Perspective
fn clone(&self) -> Perspective
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Perspective
impl Debug for Perspective
source§impl<'de> Deserialize<'de> for Perspective
impl<'de> Deserialize<'de> for Perspective
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Perspective, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Perspective, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Perspective
impl Hash for Perspective
source§impl PartialEq<Perspective> for Perspective
impl PartialEq<Perspective> for Perspective
source§fn eq(&self, other: &Perspective) -> bool
fn eq(&self, other: &Perspective) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Perspective
impl Serialize for Perspective
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