Merge branch '13-rename-app-to-engine' into 'master'
Resolve "Rename App to Engine" Closes #13 See merge request marty.oehme/cellular-automata!3
This commit is contained in:
commit
e472766bcc
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
import 'package:angular/angular.dart';
|
import 'package:angular/angular.dart';
|
||||||
|
|
||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
import 'package:rules_of_living/src/App.dart';
|
import 'package:rules_of_living/src/Engine.dart';
|
||||||
|
|
||||||
@Component(
|
@Component(
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
|
@ -10,7 +10,7 @@ import 'package:rules_of_living/src/App.dart';
|
||||||
class AppComponent implements OnInit {
|
class AppComponent implements OnInit {
|
||||||
var name = "World";
|
var name = "World";
|
||||||
|
|
||||||
App engine;
|
Engine engine;
|
||||||
|
|
||||||
@ViewChild("caCanvas")
|
@ViewChild("caCanvas")
|
||||||
html.CanvasElement canvas;
|
html.CanvasElement canvas;
|
||||||
|
@ -24,7 +24,7 @@ class AppComponent implements OnInit {
|
||||||
If you see this
|
If you see this
|
||||||
the app is broken :(
|
the app is broken :(
|
||||||
''', canvas.width/2, canvas.height/2);
|
''', canvas.width/2, canvas.height/2);
|
||||||
engine = new App(canvas);
|
engine = new Engine(canvas);
|
||||||
|
|
||||||
html.window.animationFrame.then(animFrame);
|
html.window.animationFrame.then(animFrame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:html' as html;
|
||||||
|
|
||||||
import 'package:rules_of_living/src/Grid.dart';
|
import 'package:rules_of_living/src/Grid.dart';
|
||||||
|
|
||||||
class App {
|
class Engine {
|
||||||
// Elapsed Time Counter - useful for Safety Timeout
|
// Elapsed Time Counter - useful for Safety Timeout
|
||||||
Stopwatch _elapsed = new Stopwatch();
|
Stopwatch _elapsed = new Stopwatch();
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class App {
|
||||||
Grid grid = new Grid(100, 100);
|
Grid grid = new Grid(100, 100);
|
||||||
bool running = false;
|
bool running = false;
|
||||||
|
|
||||||
App(this.canvas) {
|
Engine(this.canvas) {
|
||||||
_elapsed.start();
|
_elapsed.start();
|
||||||
grid.addPattern(amount: 15, dispersal: 5);
|
grid.addPattern(amount: 15, dispersal: 5);
|
||||||
}
|
}
|
Loading…
Reference in a new issue