pub enum PureMove {
    NonTamMoveSrcDst {
        src: Coord,
        dest: Coord,
        is_water_entry_ciurl: bool,
    },
    NonTamMoveSrcStepDstFinite {
        src: Coord,
        step: Coord,
        dest: Coord,
        is_water_entry_ciurl: bool,
    },
    InfAfterStep {
        src: Coord,
        step: Coord,
        planned_direction: Coord,
    },
    NonTamMoveFromHopZuo {
        color: Color,
        prof: Profession,
        dest: Coord,
    },
    TamMoveNoStep {
        src: Coord,
        first_dest: Coord,
        second_dest: Coord,
    },
    TamMoveStepsDuringFormer {
        src: Coord,
        step: Coord,
        first_dest: Coord,
        second_dest: Coord,
    },
    TamMoveStepsDuringLatter {
        src: Coord,
        step: Coord,
        first_dest: Coord,
        second_dest: Coord,
    },
}

Variants§

§

NonTamMoveSrcDst

Fields

§src: Coord
§dest: Coord
§is_water_entry_ciurl: bool
§

NonTamMoveSrcStepDstFinite

Fields

§src: Coord
§step: Coord
§dest: Coord
§is_water_entry_ciurl: bool
§

InfAfterStep

Fields

§src: Coord
§step: Coord
§planned_direction: Coord
§

NonTamMoveFromHopZuo

Fields

§color: Color
§dest: Coord
§

TamMoveNoStep

Fields

§src: Coord
§first_dest: Coord
§second_dest: Coord
§

TamMoveStepsDuringFormer

Fields

§src: Coord
§step: Coord
§first_dest: Coord
§second_dest: Coord
§

TamMoveStepsDuringLatter

Fields

§src: Coord
§step: Coord
§first_dest: Coord
§second_dest: Coord

Implementations§

Serializes PureMove in textual form.

Examples
use cetkaik_yhuap_move_candidates::*;
use cetkaik_yhuap_move_candidates::pure_move::*;
use cetkaik_core::*;

assert_eq!(PureMove::InfAfterStep {
    src: absolute::Coord(absolute::Row::A, absolute::Column::Z),
    step: absolute::Coord(absolute::Row::E, absolute::Column::T),
    planned_direction: absolute::Coord(absolute::Row::E, absolute::Column::N)
}.serialize(), "ZA片TE心NE");

assert_eq!(PureMove::NonTamMoveFromHopZuo {
    color: Color::Huok2,
    prof: Profession::Gua2,
    dest: absolute::Coord(absolute::Row::IA, absolute::Column::L)
}.serialize(), "黒弓LIA");

assert_eq!(PureMove::NonTamMoveSrcDst {
    src: absolute::Coord(absolute::Row::A, absolute::Column::Z),
    dest: absolute::Coord(absolute::Row::E, absolute::Column::N),
    is_water_entry_ciurl: true
}.serialize(), "ZA片NE水");

assert_eq!(PureMove::NonTamMoveSrcStepDstFinite {
    src: absolute::Coord(absolute::Row::A, absolute::Column::Z),
    step: absolute::Coord(absolute::Row::E, absolute::Column::T),
    dest: absolute::Coord(absolute::Row::E, absolute::Column::N),
    is_water_entry_ciurl: false
}.serialize(), "ZA片TENE");

// Note that [] denotes the first destination.
// Since the first destination is neither the stepping square nor the final square,
// it is not to be written in the standard notation.
// Hence this additional information is denoted by [].
assert_eq!(PureMove::TamMoveStepsDuringFormer {
    src: absolute::Coord(absolute::Row::E, absolute::Column::K),
    step: absolute::Coord(absolute::Row::I, absolute::Column::L),
    first_dest: absolute::Coord(absolute::Row::I, absolute::Column::K),
    second_dest: absolute::Coord(absolute::Row::E, absolute::Column::L)
}.serialize(), "KE皇LI[KI]LE");

assert_eq!(PureMove::TamMoveNoStep {
    src: absolute::Coord(absolute::Row::E, absolute::Column::K),
    first_dest: absolute::Coord(absolute::Row::I, absolute::Column::K),
    second_dest: absolute::Coord(absolute::Row::E, absolute::Column::K)
}.serialize(), "KE皇[KI]KE");

assert_eq!(PureMove::TamMoveStepsDuringLatter {
    src: absolute::Coord(absolute::Row::E, absolute::Column::K),
    first_dest: absolute::Coord(absolute::Row::I, absolute::Column::K),
    step: absolute::Coord(absolute::Row::I, absolute::Column::L),
    second_dest: absolute::Coord(absolute::Row::E, absolute::Column::L)
}.serialize(), "KE皇[KI]LILE");

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.