def _coord_to_action(board, c):
 if (c == pachi_py.PASS_COORD):
  return _pass_action(board.size)
 if (c == pachi_py.RESIGN_COORD):
  return _resign_action(board.size)
 (i, j) = board.coord_to_ij(c)
 return ((i * board.size) + j)

def _coord_to_action ( board , c ) : if ( c == pachi_py . PASS_COORD ) : return _pass_action ( board . size ) if ( c == pachi_py . RESIGN_COORD ) : return _resign_action ( board . size ) ( i , j ) = board . coord_to_ij ( c ) return ( ( i * board . size ) + j )
converts pachi coordinates to actions .