[][src]Module cetkaik_yhuap_move_candidates::absolute

Defines things in the absolute term: "which piece lies in the square LIA?"

Structs

Coord

Describes the absolute coordinate. /盤上の絶対座標を表す。

Field

Describes the field, which is defined as a board plus each side's hop1zuo1. フィールドを表す。フィールドとは、盤に両者の手駒を加えたものである。

NonTam2Piece

Describes a piece that is not a Tam2, and hence can be taken and be placed in a hop1zuo1. /駒のうち、皇以外を表す。これは手駒として存在できる駒でもある。

Enums

Column

Describes the column. /盤上の絶対座標のうち列(縦列)を表す。

Piece

Describes a piece on the board. /盤上に存在できる駒を表現する。

Row

Describes the row. /盤上の絶対座標のうち行(横列)を表す。

Side

Describes which player it is /どちら側のプレイヤーであるかを指定する。

Functions

distance

Calculates the distance between two points. The distance is defined as the larger of the difference between either the x or y coordinates. /2点間の距離(x座標の差およびy座標の差のうち小さくない方)を計算する。

is_water

Checks if the square is a tam2 nua2 (tam2's water), entry to which is restricted. /マスが皇水(たむぬあ)であるかどうかの判定

parse_coord

Parses Coord.

serialize_coord

Serializes Coord.

yhuap_initial_board

Returns the initial configuration as specified in the y1 huap1 (the standardized rule). As can be seen in https://raw.githubusercontent.com/sozysozbot/cerke/master/y1_huap1_summary_en.pdf, a black king is in ZIA while a red king is in ZA. /官定で定められた初期配置を与える。 https://raw.githubusercontent.com/sozysozbot/cerke/master/y1_huap1_summary.pdf にあるように、 ZIAには黒王、ZAには赤王がある。

Type Definitions

Board

Describes the board, the 9x9 squares, in terms of absolute coordinates. 盤、つまり、9x9のマス目を、絶対座標で表す。