Created
September 4, 2017 21:34
-
-
Save jecfish/80ea1826d11341a9ef082904eb5ed41a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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