Skip to content

MOVE,ENDOFMOVE,EXPLOREHUT

stanislawbartkowski edited this page Mar 14, 2019 · 3 revisions

Action

This action continues movement started by last STARTOFMOVE or terminates the move.

Format

executeCommand(token,"MOVE",row,col,null)
executeCommand(token,"ENDOFMOVE",-1,-1,null)
executeCommand(token,"EXPLOREHUT",row,colnull)

Parameters for MOVE

  • row,col : target square to move, adjacent to the previous square

Parameters for EXPLOREHUT

  • row,col : the hut square to explore

Usage example

executeCommand(token,"MOVE",2,3,null)
executeCommand(token,"EXPLOREHUT",0,1,null)

Itemize

Only for MOVE AND EXPLOREHUT.
{ p: {row:<number>,col:<number>}, moves[{row:<number>,col:<number> ...]}

{ p: {row:<number>,col:<number>}, explore[{row:<number>,col:<number> ...]}

  • p : current square
  • moves : list of possible target squares

Examples:

{ p : {row : 2,col : 1}, moves : [{ row : 2, col : 2}, {row : 2,col: 0}]}