2018-10-18 10:16:47 +00:00
|
|
|
import 'dart:math';
|
|
|
|
|
2018-10-18 10:05:02 +00:00
|
|
|
import 'package:rules_of_living/service/engine_service.dart';
|
|
|
|
|
|
|
|
class SimulationService {
|
2018-10-18 10:16:47 +00:00
|
|
|
final EngineService _engine;
|
2018-10-18 10:05:02 +00:00
|
|
|
|
2018-10-18 10:16:47 +00:00
|
|
|
SimulationService(this._engine);
|
2018-10-18 10:05:02 +00:00
|
|
|
|
|
|
|
void reset() {
|
2018-10-18 10:16:47 +00:00
|
|
|
_engine.reset();
|
2018-10-18 10:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void addRandomPattern() {
|
2018-10-18 10:16:47 +00:00
|
|
|
_engine.addRandomPattern();
|
2018-10-18 10:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void clear() {
|
2018-10-18 10:16:47 +00:00
|
|
|
_engine.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void set gridSize(Point size) {
|
|
|
|
_engine.engine.gridSize = size;
|
2018-10-18 10:05:02 +00:00
|
|
|
}
|
2018-10-18 10:16:47 +00:00
|
|
|
|
|
|
|
Point<int> get gridSize => _engine.engine.gridSize;
|
2018-10-18 10:05:02 +00:00
|
|
|
}
|