pub struct CetkaikCore;
Trait Implementations§
source§impl CetkaikRepresentation for CetkaikCore
impl CetkaikRepresentation for CetkaikCore
cetkaik_core
クレートに基づいており、視点に依らない絶対座標での表現と、視点に依る相対座標への表現を正しく相互変換できる。
type Perspective = Perspective
type AbsoluteCoord = Coord
type RelativeCoord = [usize; 2]
type AbsoluteBoard = HashMap<Coord, Piece, RandomState>
type RelativeBoard = [[Option<Piece>; 9]; 9]
type AbsolutePiece = Piece
type RelativePiece = Piece
type AbsoluteSide = Side
type RelativeSide = Side
type AbsoluteField = Field
type RelativeField = Field
fn to_absolute_coord(
coord: Self::RelativeCoord,
p: Self::Perspective
) -> Self::AbsoluteCoord
fn add_delta(
coord: Self::RelativeCoord,
row_delta: isize,
col_delta: isize
) -> Option<Self::RelativeCoord>
fn relative_get(
board: Self::RelativeBoard,
coord: Self::RelativeCoord
) -> Option<Self::RelativePiece>
fn relative_clone_and_set(
board: &Self::RelativeBoard,
coord: Self::RelativeCoord,
p: Option<Self::RelativePiece>
) -> Self::RelativeBoard
fn absolute_get(
board: &Self::AbsoluteBoard,
coord: Self::AbsoluteCoord
) -> Option<Self::AbsolutePiece>
fn is_tam_hue_by_default(coord: Self::RelativeCoord) -> bool
fn relative_tam2() -> Self::RelativePiece
fn absolute_tam2() -> Self::AbsolutePiece
fn is_upward(s: Self::RelativeSide) -> bool
fn match_on_piece_and_apply<U>(
piece: Self::RelativePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Profession, Self::RelativeSide) -> U
) -> U
fn empty_squares_relative(board: &Board) -> Vec<Coord>
fn empty_squares_absolute(board: &Board) -> Vec<Self::AbsoluteCoord>
fn hop1zuo1_of(
side: Self::AbsoluteSide,
field: &Self::AbsoluteField
) -> Vec<ColorAndProf>
fn as_board_absolute(field: &Self::AbsoluteField) -> &Self::AbsoluteBoard
fn as_board_relative(field: &Self::RelativeField) -> &Self::RelativeBoard
fn is_water_relative(c: Self::RelativeCoord) -> bool
fn loop_over_one_side_and_tam(
board: &Self::RelativeBoard,
side: Self::RelativeSide,
f_tam_or_piece: &mut dyn FnMut(Self::RelativeCoord, Option<Profession>)
)
fn to_relative_field(
field: Self::AbsoluteField,
p: Self::Perspective
) -> Self::RelativeField
fn to_relative_side(
side: Self::AbsoluteSide,
p: Self::Perspective
) -> Self::RelativeSide
fn get_one_perspective() -> Self::Perspective
fn absolute_distance(a: Self::AbsoluteCoord, b: Self::AbsoluteCoord) -> i32
fn absolute_same_direction(
origin: Self::AbsoluteCoord,
a: Self::AbsoluteCoord,
b: Self::AbsoluteCoord
) -> bool
fn to_cetkaikcore_absolute_side(a: Self::AbsoluteSide) -> Side
fn from_cetkaikcore_absolute_side(a: Side) -> Self::AbsoluteSide
source§impl Clone for CetkaikCore
impl Clone for CetkaikCore
source§fn clone(&self) -> CetkaikCore
fn clone(&self) -> CetkaikCore
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 CetkaikCore
impl Debug for CetkaikCore
source§impl Hash for CetkaikCore
impl Hash for CetkaikCore
source§impl PartialEq<CetkaikCore> for CetkaikCore
impl PartialEq<CetkaikCore> for CetkaikCore
source§fn eq(&self, other: &CetkaikCore) -> bool
fn eq(&self, other: &CetkaikCore) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.