Update:
rex_board plugin - add conditions and expressions to get an empty cell. See the section "Get empty cell" in this page.
Get empty cell
Sample capx
"Condition:Has any empty cell" is used to check if there has any empty cell on the board, user could get the logical (x,y) of an empty cell by "Expression:EmptyLX", and "Expression:EmptyLY".
"Condition:Pick an empty cell" is used to get an empty cell randomly, the logical (x,y) of picking result is got by "Expression:EmptyLX", and "Expression:EmptyLY", too.
If all cells are occupied, these two conditions will return false.