[−][src]Struct cetkaik_full_state_transition::state::A
Normal state. /一番普通の状態。
Fields
f: Field
whose_turn: Side
season: Season
scores: Scores
rate: Rate
tam_has_moved_previously: bool
Implementations
impl A
[src]
#[must_use]pub fn get_candidates(&self, config: Config) -> (Vec<PureMove>, Vec<PureMove>)
[src]
use cetkaik_full_state_transition::message::InfAfterStep; use cetkaik_full_state_transition::*; use cetkaik_core::absolute; use cetkaik_core::absolute::Coord; use cetkaik_core::absolute::Row::*; use cetkaik_core::absolute::Column::*; let ia_first = state::A { whose_turn: absolute::Side::IASide, scores: Scores::new(), rate: Rate::X1, season: Season::Iei2, tam_has_moved_previously: false, f: absolute::Field { a_side_hop1zuo1: vec![], ia_side_hop1zuo1: vec![], board: cetkaik_core::absolute::yhuap_initial_board(), }, }; let (hop1zuo1_candidates, candidates) = ia_first.get_candidates(Config::cerke_online_alpha()); assert_eq!(hop1zuo1_candidates, vec![]); let inf_after_step: Vec<_> = candidates.into_iter() .filter_map(|a| match a { message::PureMove::InfAfterStep(m) => Some(m), _ => None } ).collect(); assert_eq!(inf_after_step, vec![ InfAfterStep { src: Coord(IA, P), step: Coord(AU, P), planned_direction: Coord(IA, P) }, InfAfterStep { src: Coord(IA, K), step: Coord(AU, K), planned_direction: Coord(IA, K) }, InfAfterStep { src: Coord(AU, P), step: Coord(AU, M), planned_direction: Coord(AU, C) }, InfAfterStep { src: Coord(AU, P), step: Coord(AU, M), planned_direction: Coord(AU, P) }, InfAfterStep { src: Coord(AU, M), step: Coord(AI, M), planned_direction: Coord(Y, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AI, M), planned_direction: Coord(O, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AI, M), planned_direction: Coord(U, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AI, M), planned_direction: Coord(I, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AI, M), planned_direction: Coord(AU, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(IA, M), planned_direction: Coord(AU, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AU, X), planned_direction: Coord(AU, Z) }, InfAfterStep { src: Coord(AU, M), step: Coord(AU, X), planned_direction: Coord(AU, C) }, InfAfterStep { src: Coord(AU, M), step: Coord(AU, X), planned_direction: Coord(AU, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AU, P), planned_direction: Coord(AU, M) }, InfAfterStep { src: Coord(AU, M), step: Coord(AU, P), planned_direction: Coord(AU, C) }, InfAfterStep { src: Coord(AU, X), step: Coord(AI, C), planned_direction: Coord(Y, X) }, InfAfterStep { src: Coord(AU, X), step: Coord(AI, C), planned_direction: Coord(O, P) }, InfAfterStep { src: Coord(AU, X), step: Coord(AI, C), planned_direction: Coord(Y, M) }, InfAfterStep { src: Coord(AU, X), step: Coord(AI, C), planned_direction: Coord(AU, X) }, InfAfterStep { src: Coord(AU, T), step: Coord(AI, N), planned_direction: Coord(O, K) }, InfAfterStep { src: Coord(AU, T), step: Coord(AI, N), planned_direction: Coord(Y, L) }, InfAfterStep { src: Coord(AU, T), step: Coord(AI, N), planned_direction: Coord(Y, T) }, InfAfterStep { src: Coord(AU, T), step: Coord(AI, N), planned_direction: Coord(AU, T) }, InfAfterStep { src: Coord(AU, L), step: Coord(AI, L), planned_direction: Coord(Y, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AI, L), planned_direction: Coord(O, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AI, L), planned_direction: Coord(U, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AI, L), planned_direction: Coord(I, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AI, L), planned_direction: Coord(AU, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(IA, L), planned_direction: Coord(AU, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AU, K), planned_direction: Coord(AU, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AU, K), planned_direction: Coord(AU, N) }, InfAfterStep { src: Coord(AU, L), step: Coord(AU, T), planned_direction: Coord(AU, N) }, InfAfterStep { src: Coord(AU, L), step: Coord(AU, T), planned_direction: Coord(AU, L) }, InfAfterStep { src: Coord(AU, L), step: Coord(AU, T), planned_direction: Coord(AU, Z) }, InfAfterStep { src: Coord(AU, K), step: Coord(AU, L), planned_direction: Coord(AU, K) }, InfAfterStep { src: Coord(AU, K), step: Coord(AU, L), planned_direction: Coord(AU, N) }, InfAfterStep { src: Coord(AI, Z), step: Coord(O, Z), planned_direction: Coord(U, Z) }, InfAfterStep { src: Coord(AI, Z), step: Coord(O, Z), planned_direction: Coord(I, Z) }, InfAfterStep { src: Coord(AI, Z), step: Coord(O, Z), planned_direction: Coord(Y, Z) }, InfAfterStep { src: Coord(AI, Z), step: Coord(O, Z), planned_direction: Coord(AI, Z) }, InfAfterStep { src: Coord(AI, Z), step: Coord(O, Z), planned_direction: Coord(AU, Z) } ])
Trait Implementations
impl Clone for A
[src]
impl Debug for A
[src]
impl<'de> Deserialize<'de> for A
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for A
[src]
Auto Trait Implementations
impl RefUnwindSafe for A
[src]
impl Send for A
[src]
impl Sync for A
[src]
impl Unpin for A
[src]
impl UnwindSafe for A
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,