applyMove static method

String applyMove(
  1. GameRef g,
  2. String annotation
)

Attempt to apply a move to the game state

Implementation

static String applyMove(GameRef g, String annotation) {
  final a = annotation.toNativeUtf8() as ffi.Pointer<ffi.Char>;
  final errorData = _core.apply_move(g, a) as ffi.Pointer<Utf8>;
  final error = errorData.toDartString();
  malloc.free(a);
  malloc.free(errorData);
  return error;
}