pub struct CetkaikNaive;
Expand description
cetkaik_naive_representation
クレートを表すためのマーカー型
Trait Implementations§
source§impl CetkaikRepresentation for CetkaikNaive
impl CetkaikRepresentation for CetkaikNaive
cetkaik_naive_representation
クレートに基づいており、視点に依らない絶対座標での表現と、視点に依る相対座標への表現を正しく相互変換できる。
type Perspective = Perspective
type AbsoluteCoord = Coord
type RelativeCoord = [usize; 2]
type AbsoluteBoard = Board
type RelativeBoard = Board
type AbsolutePiece = Piece
type RelativePiece = Piece
type RelativeSide = Side
type AbsoluteField = Field
type RelativeField = Field
fn to_absolute_coord(
coord: Self::RelativeCoord,
p: Self::Perspective
) -> Self::AbsoluteCoord
fn to_relative_coord(
coord: Self::AbsoluteCoord,
p: Self::Perspective
) -> Self::RelativeCoord
fn add_delta(
coord: Self::RelativeCoord,
row_delta: isize,
col_delta: isize
) -> Option<Self::RelativeCoord>
source§fn relative_get(
board: Self::RelativeBoard,
coord: Self::RelativeCoord
) -> Option<Self::RelativePiece>
fn relative_get(
board: Self::RelativeBoard,
coord: Self::RelativeCoord
) -> Option<Self::RelativePiece>
👎Deprecated: Use
board.peek(coord)
source§fn relative_clone_and_set(
board: &Self::RelativeBoard,
coord: Self::RelativeCoord,
p: Option<Self::RelativePiece>
) -> Self::RelativeBoard
fn relative_clone_and_set(
board: &Self::RelativeBoard,
coord: Self::RelativeCoord,
p: Option<Self::RelativePiece>
) -> Self::RelativeBoard
👎Deprecated: Use
new_board.put(coord, p)
source§fn absolute_get(
board: &Self::AbsoluteBoard,
coord: Self::AbsoluteCoord
) -> Option<Self::AbsolutePiece>
fn absolute_get(
board: &Self::AbsoluteBoard,
coord: Self::AbsoluteCoord
) -> Option<Self::AbsolutePiece>
👎Deprecated: Use
board.peek(coord)
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 as_board_absolute(field: &Self::AbsoluteField) -> &Self::AbsoluteBoard
fn as_board_mut_absolute(
field: &mut Self::AbsoluteField
) -> &mut Self::AbsoluteBoard
fn as_board_relative(field: &Self::RelativeField) -> &Self::RelativeBoard
fn is_water_relative(c: Self::RelativeCoord) -> bool
fn is_water_absolute(c: Self::AbsoluteCoord) -> 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: 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
source§fn has_prof_absolute(piece: Self::AbsolutePiece, prof: Profession) -> bool
fn has_prof_absolute(piece: Self::AbsolutePiece, prof: Profession) -> bool
👎Deprecated: Use
piece.has_prof(prof)
source§fn match_on_relative_piece_and_apply<U>(
piece: Self::RelativePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Color, Profession, Self::RelativeSide) -> U
) -> U
fn match_on_relative_piece_and_apply<U>(
piece: Self::RelativePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Color, Profession, Self::RelativeSide) -> U
) -> U
👎Deprecated: Use
piece.match_on_piece_and_apply(f_tam, f_piece)
source§fn match_on_absolute_piece_and_apply<U>(
piece: Self::AbsolutePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Color, Profession, AbsoluteSide) -> U
) -> U
fn match_on_absolute_piece_and_apply<U>(
piece: Self::AbsolutePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Color, Profession, AbsoluteSide) -> U
) -> U
👎Deprecated: Use
piece.match_on_piece_and_apply(f_tam, f_piece)
source§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 match_on_piece_and_apply<U>(
piece: Self::RelativePiece,
f_tam: &dyn Fn() -> U,
f_piece: &dyn Fn(Profession, Self::RelativeSide) -> U
) -> U
👎Deprecated: Use
piece.match_on_piece_and_apply(f_tam, f_piece)
source§fn empty_squares_relative(
board: &Self::RelativeBoard
) -> Vec<Self::RelativeCoord, Global>
fn empty_squares_relative(
board: &Self::RelativeBoard
) -> Vec<Self::RelativeCoord, Global>
👎Deprecated: Use
board.empty_squares().collect::<Vec<_>>()
source§fn empty_squares_absolute(
board: &Self::AbsoluteBoard
) -> Vec<Self::AbsoluteCoord, Global>
fn empty_squares_absolute(
board: &Self::AbsoluteBoard
) -> Vec<Self::AbsoluteCoord, Global>
👎Deprecated: Use
board.empty_squares().collect::<Vec<_>>()
source§fn hop1zuo1_of(
side: AbsoluteSide,
field: &Self::AbsoluteField
) -> Vec<ColorAndProf, Global>
fn hop1zuo1_of(
side: AbsoluteSide,
field: &Self::AbsoluteField
) -> Vec<ColorAndProf, Global>
👎Deprecated: Use
field.hop1zuo1_of(side).collect::<Vec<_>>()
source§impl Clone for CetkaikNaive
impl Clone for CetkaikNaive
source§fn clone(&self) -> CetkaikNaive
fn clone(&self) -> CetkaikNaive
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 CetkaikNaive
impl Debug for CetkaikNaive
source§impl Hash for CetkaikNaive
impl Hash for CetkaikNaive
source§impl PartialEq<CetkaikNaive> for CetkaikNaive
impl PartialEq<CetkaikNaive> for CetkaikNaive
source§fn eq(&self, other: &CetkaikNaive) -> bool
fn eq(&self, other: &CetkaikNaive) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.