Stockfish constructor

Stockfish()

Creates a C++ engine.

This may throws a StateError if an active instance is being used. Owner must dispose it before a new instance can be created.

Implementation

factory Stockfish() {
  if (_instance != null) {
    throw new StateError('Multiple instances are not supported, yet.');
  }

  _instance = Stockfish._();
  return _instance!;
}