Provides some helper methods to get logical position of chess, or to pick chess, or to move chess, etc.
Categories > Board > rex_chessIntroductionLinksDependenceUsageAddRemoveMoveGet logical positionGet other chess's UIDTest conditionsMore samples
None
Action:Add chess
adds this chess instance to a board object.
Action:Remove chess
removes chess instance from current board.
These actions change the logical position only, physical position won't be changed.
Action:Move chess
, or Action:Move chess by UID
: move this chess to target tile, the logical z index will not be changed.Action:Move chess to xyz
: moves chess to specific logical position.Action:Swap chess by UID
: swaps the logical position with another chess by UID.Get the logical position of this chess by (Expression:LX
, Expression:LY
, Expression:LZ
).
Get the board UID by Expression:BoardUID
, return (-1) if chess instance is not on any board.
Expression:LZ2UID
: get other chess's UID which stands on the same logical XY position with specific z-index.
Expression:DIR2UID
: get UID of neighbor chess, return (-1) if no chess picked.
These test condition would return true if testing pass, these condition will also affect the current SOL.
Logical position
Condition:Compare LX
Condition:Compare LY
Condition:Compare LZ
,Is empty above
Condition:No chess above
, returns true if no chess is put above this chess. i.e. the count of z-index is 1. Condition:No chess at LZ
, returns true if no other chess at the specific z-index.On the board
Condition:On the board
, returns true if this chess instance is at the specific board. Are neighbors
Condition:Are neighbors (UID)
, returns true if this chess and another chess are neighbors.Is a tile
Condition:Is a tile
, returns true if this chess is a tile (z=0).Pick an empty cell randomly -- Sample capx
Condition:No chess at LZ
with other test conditions and finally pick a chess instance randomly by system action: pick random instance
.Drag tile/chess on an isometric board -- Sample capx
Swap chess from two different board -- Sample capx