Categories > Board > rex_miniboard_move

Introduction

A behavior of mini board, which move chess on main board logically and physically.

Links


Categories > Board > rex_miniboard_moveIntroductionLinksDependenceUsageMove toCan moveMore samples

Dependence

Usage

Physical position MoveTo behavior Recover Putable testingYesYesNoYesReaching targetProperty: MoveTo+Every tick- Set physical position+Condition:On hit target positionRecover LXYZof all chessPut chesson main boardMap chess LXYZto main boardPutable testing----- None, always true- Cell is empty- Condition:On put-able request----For each chessAll chessare putableAction:Move to neighbor, orAction:Move to offset, orAction:Move to LXY, orAction:Move to chessIs on main boardMove from(Expression:SourceLX, Expression:SourceLY)to(Expression:DestinationLX, Expression:DestinationLY)direction: Expression:DirectionPull out chessfrom main boardPut chesson main board+Condition:On moving accepted+Condition:On moving rejected

Move to

Sample capx

  1. Start moving

    • Action:Move to neighbor, or
    • Action:Move to offset, or
    • Action:Move to LXY, or
    • Action:Move to chess
  2. If mini board is on main board

    1. Save position of chess

    2. Pull out from this main board

    3. Move LXYZ of mini board

      • from (Expression:SourceLX, Expression:SourceLY)
      • to (Expression:DestinationLX, Expression:DestinationLY)
      • direction: Expression:Direction , if the target is a neighbor.
    4. Run put-able testing of all chess

      • Put-able, all test results are true

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

        1. Recover position of chess
        2. Put chess to main board
        3. Trigger Condition:On moving rejected
    5. If put-able and property MoveTo is Yes

      1. Grid move mini board to target physical position (Expression:TargetX, Expression:TargetY)

        1. Move all chess with mini board, if property Pin mode of mini board is Yes.
      2. Trigger Condition:On hit target position when reach target position

Can move


More samples

Tetris