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,
    },
}
Expand description

Describes a move denoted in absolute coordinates. /絶対座標で書かれた指し手を表す。

Variants§

§

NonTamMoveSrcDst

Fields

§src: Coord

origin/開始点

§dest: Coord

final destination/終了点

§is_water_entry_ciurl: bool

whether a water-entry ciurl is required/入水判定が必要かどうか

A non-Tam2 piece moves from a square on a board to another square without stepping. /皇ではない駒が、盤上から盤上に踏越えなしで移動する。

§

NonTamMoveSrcStepDstFinite

Fields

§src: Coord

origin/開始点

§step: Coord

via point/経由点

§dest: Coord

destination/終了点

§is_water_entry_ciurl: bool

whether a water-entry ciurl is required/入水判定が必要かどうか

A non-Tam2 piece moves from a square on a board to another square, during which it steps another piece and does a finite movement. /皇ではない駒が、盤上から盤上に踏越えを伴いながら移動し、踏越え後は有限移動をする。

§

InfAfterStep

Fields

§src: Coord

origin/開始点

§step: Coord

via point/経由点

§planned_direction: Coord

the planned LOCATION. After casting the sticks, some rules necessitates that you go to the destination or to the direction that you have declared beforehand. Hence the confusing name. /行く予定の場所。踏越え判定後の移動先は、ルールによっては「計画したマス」である必要があったり「計画した方角」である必要があったりする。

A non-Tam2 piece moves from a square on a board to another square, during which it steps another piece and tries to do a directional, infinite movement. /皇ではない駒が、盤上から盤上に踏越えを伴いながら移動し、踏越え後は無限移動をしようとする。

§

NonTamMoveFromHopZuo

Fields

§color: Color

color/駒の色

§prof: Profession

profession/駒の役職

§dest: Coord

destination/終了点

A non-Tam2 piece moves from hop1zuo1 to a square on a board. /皇ではない駒が、手駒から盤上に移動する。

§

TamMoveNoStep

Fields

§src: Coord

origin/開始点

§first_dest: Coord

first destination/一回目の終了点

§second_dest: Coord

second destination/二回目の終了点

A Tam2 moves from a square on a board to another square without stepping. /皇が盤上から盤上に踏越えなしで移動する。

§

TamMoveStepsDuringFormer

Fields

§src: Coord

origin/開始点

§step: Coord

via point/経由点

§first_dest: Coord

first destination/一回目の終了点

§second_dest: Coord

second destination/二回目の終了点

A Tam2 moves from a square on a board to another square. In the former half of its movement, it steps another piece. /皇が盤上から盤上に移動し、一回目の移動の最中に踏越えをする。

§

TamMoveStepsDuringLatter

Fields

§src: Coord

origin/開始点

§step: Coord

via point/経由点

§first_dest: Coord

first destination/一回目の終了点

§second_dest: Coord

second destination/二回目の終了点

A Tam2 moves from a square on a board to another square. In the latter half of its movement, it steps another piece. /皇が盤上から盤上に移動し、二回目の移動の最中に踏越えをする。

Implementations§

Serializes PureMove in textual form.

Examples
use cetkaik_core::*;
use cetkaik_core::absolute::*;

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

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

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

assert_eq!(PureMove::NonTamMoveSrcStepDstFinite {
    src: Coord(Row::A, Column::Z),
    step: Coord(Row::E, Column::T),
    dest: Coord(Row::E, 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: Coord(Row::E, Column::K),
    step: Coord(Row::I, Column::L),
    first_dest: Coord(Row::I, Column::K),
    second_dest: Coord(Row::E, Column::L)
}.serialize(), "KE皇LI[KI]LE");

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

assert_eq!(PureMove::TamMoveStepsDuringLatter {
    src: Coord(Row::E, Column::K),
    first_dest: Coord(Row::I, Column::K),
    step: Coord(Row::I, Column::L),
    second_dest: Coord(Row::E, 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 ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.