Unknown
7729da3a40
Methods concerning engine make use of EngineService, those concerning grid and patterns make use of SimulationService.
27 lines
460 B
Dart
27 lines
460 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 size) {
|
|
_engine.engine.gridSize = size;
|
|
}
|
|
|
|
Point<int> get gridSize => _engine.engine.gridSize;
|
|
}
|