Categories > Board > rex_miniboard

Introduction

A board-container to group chess and move them together.

Links


Categories > Board > rex_miniboardIntroductionLinksDependenceUsageSetup layoutChess groupAdd chessDestroyRelease chessPut on the main boardPut-able testingPull out from main boardOn main boardPin chessLogical and physical positionLayerSOLColor

Dependence

Usage

Setup layout

Puts one of board-layout plugin

Mini boardSquareTxHexTx

into project. Each board object should have a board-layout object.

Mini board and rex_board could share the same board-layout.

Assign board-layout object manually by Action:Setup layout if the project has more than one board, and each board has different board-layout.


Chess group

Sample capx

Add chess

A mini board object is a chess group.

Destroy

All chess in this mini board will be destroyed when the mini board is destroyed.

Release chess

Action:Release all chess, to release the reference of chess in this mini board. These chess will still exist.


Put on the main board

Recover Putable testingYesNoYesNoNoYesRecover LXYZof all chessPut chesson main boardMap chess LXYZto main boardPutable testing----- None, always true- Is inside main board- Cell is empty- Condition:On put-able request----For each chessAll chessare putableAction:PutRecover =Is on main boardPull out chessfrom main boardPut chesson main board+Condition:On rotating acceptedRecover+Condition:On rotating rejected

Sample capx

  1. Action:Put, or Action:Put back

  2. If this min board is on main board already

    1. Save position of chess, Set Recover = true
    2. Pull out from this main board
  3. Run put-able testing of all chess

    • Put-able, all test results are true

      1. Put chess to main board
      2. Trigger Condition:On putting accepted
    • Not Put-able, any test result are false

      1. If Recover = true

        1. Recover position of chess
        2. Put chess to main board
      2. Trigger Condition:On putting rejected

    • Condition:Is putting accepted returns true if putable.

Put-able testing

Putable testing of a chessMode = PutableYesNo+Condition:On put-able requestTry putChess Expression:RequestChessUIDon main board Expression:RequestMainBoardUIDat (Expression:RequestLX, Expression:RequestLY, Expression:RequestLZ)-Action:Set put-ableAction:Put, orCondition:Can putFor each chessin mini boardAll chessare putablePutableNot putable

Action:Put, Action:Put backor Condition:Can put will run one of put-able testing for each chess on min board.

Put-able of mini board

Pull out from main board

Action:Pull out to put out this mini board from main board, i.e. remove the logical position of chess in this mini board. Do nothing if this mini board is not on any main board.

On main board


Pin chess

Set property Pin mode to Yes to pin chess to mini board.


Logical and physical position


Layer

Action:Move all to layer, to move this miniboard and all chess to another layer.


SOL


Color

Property Color is only used to identify the different mini board in layout editor.