Skip to content

Instantly share code, notes, and snippets.

@jecfish
Created September 4, 2017 21:34
Show Gist options
  • Save jecfish/80ea1826d11341a9ef082904eb5ed41a to your computer and use it in GitHub Desktop.
Save jecfish/80ea1826d11341a9ef082904eb5ed41a to your computer and use it in GitHub Desktop.
// app.component.ts
import { Component, OnInit } from '@angular/core';
import * as shuffle from 'lodash/fp/shuffle';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
cards: PolyTest.Card[];
totalSeconds = 0;
timer: any = 0;
currentTime: PolyTest.Time = { hour: 0, minute: 0, second: 0 };
isGameCompleted = false;
ngOnInit() {
this.cards = this.shuffleCards();
}
private shuffleCards(): PolyTest.Card[] {
// ...
}
resetGame() {
// ...
}
startGame() {
// ...
}
stopGame() {
// ...
}
// update the time every second
updateTime() {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment