cellular-automata/lib/service/simulation_service.dart
Unknown 99ead8691b Make gridSize in Services pass correct signature
Both need to conform to Point<int> to be accepted by the engine.
2018-10-18 12:29:46 +02:00

27 lines
465 B
Dart

import 'dart:math';
import 'package:rules_of_living/service/engine_service.dart';
class SimulationService {
final EngineService _engine;
SimulationService(this._engine);
void reset() {
_engine.reset();
}
void addRandomPattern() {
_engine.addRandomPattern();
}
void clear() {
_engine.clear();
}
void set gridSize(Point<int> size) {
_engine.engine.gridSize = size;
}
Point<int> get gridSize => _engine.engine.gridSize;
}