Research Article

Mining Experiential Patterns from Game-Logs of Board Game

Algorithm 8

FindFallingCheckers.
Procedure  FindFallingCheckers
Input:
 d, the direction that will be searched in.
 PS, the specified pieces-state.
, the -coordinate of starting checker.
, the -coordinate of starting checker.
 isFS, whether it is the first step.
 allFC: the array for collecting falling checkers.
Output: Updated allFC.
Method:
()  for = 3 to −3 do
() //Don’t search the repeated falling checker.
() if   ==   then continue; endif
() //Don’t search the direction 0.
() if   == 0 then continue; endif
() Search the next jumping falling checker (, ) in direction of checker (, ).
() if (, ) exists then
()  allFC.add(new Coordinate(, ));
()  FindFallingCheckers(3, PS, , , allFC, false);
() else
()  if  isFS == true then
()   allFC.add(new Coordinate(, ));
()  endif
() endif
()  endfor
()  return  allFC;