Merge branch '11-add-delete-board-button' into 'master'

Resolve "Add Delete Board Button"

Closes #11

See merge request webdevexp/rules-of-living!2
This commit is contained in:
Marty 2018-07-08 17:46:30 +00:00
commit 1208583c7f
3 changed files with 11 additions and 3 deletions

View file

@ -56,4 +56,8 @@ class AppComponent implements OnInit {
void onEdgesClicked() { void onEdgesClicked() {
engine.grid.switchEdgeRendering(); engine.grid.switchEdgeRendering();
} }
void onClearClicked() {
engine.clear();
}
} }

View file

@ -14,8 +14,9 @@
</span> </span>
</button> </button>
<button id="step" (click)="onStepClicked()"><i class="fas fa-step-forward"></i></button> <button id="step" (click)="onStepClicked()"><i class="fas fa-step-forward"></i></button>
<button id="reset" (click)="onResetClicked()"><i class="fas fa-undo"></i></button>
<button id="random" (click)="onRandomClicked()"><i class="fas fa-random"></i></button> <button id="random" (click)="onRandomClicked()"><i class="fas fa-random"></i></button>
<button id="reset" (click)="onResetClicked()"><i class="fas fa-undo"></i></button>
<button id="clear" (click)="onClearClicked()"><i class="fas fa-trash-alt"></i></button>
<i class="fas fa-clock"> Speed:</i><input type="text" title="speed" value="1"> <i class="fas fa-clock"> Speed:</i><input type="text" title="speed" value="1">
<button id="edges" (click)="onEdgesClicked()"><i class="fas fa-chess-board"></i> </button> <button id="edges" (click)="onEdgesClicked()"><i class="fas fa-chess-board"></i> </button>
</div> </div>

View file

@ -28,11 +28,14 @@ class App {
} }
void reset() { void reset() {
// grid = new Grid(100, 100);
// running = false;
grid.reset(); grid.reset();
} }
void clear() {
grid = new Grid(100, 100);
running = false;
}
void process(num now) { void process(num now) {
_drawLag += _elapsed.elapsedMilliseconds; _drawLag += _elapsed.elapsedMilliseconds;
_updateLag += _elapsed.elapsedMilliseconds; _updateLag += _elapsed.elapsedMilliseconds;