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
/** | |
* @desc ConfigService will be used to deal with loading and saving config files that is needed to init the app | |
*/ | |
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/toPromise'; | |
@Injectable() |
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
Show hidden characters
{ | |
"rulesDirectory": ["node_modules/codelyzer"], | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"comment-format": [true, "check-space"], | |
"curly": true, | |
"eofline": true, | |
"forin": true, |
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
export class AnimateScroll { | |
constructor() {} | |
/** | |
* @desc scrollToItem Fn scrolls to an items by utilising the animated scroll fn (scrollTo) | |
* and calculating the height of the header to accurately find the item's position. | |
* @param elementID: element's ID that will be scrolled to. | |
* @param duration: duration in milliseconds, default is 750. | |
*/ | |
scrollToElement(elementID: string, duration: number = 750) { |
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
@mixin breakpoint($point) { | |
/*========== Mobile First Method ==========*/ | |
@if $point==xs { | |
@media only screen and (min-width: 0px) { | |
@content; | |
} | |
} @else if $point==sm { | |
@media only screen and (min-width: 600px) { | |
@content; | |
} |
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
type Coordinate = [number, number]; | |
/** | |
* @desc gets all possible coordinates for a knight given its current position | |
* @param x knight's current x position | |
* @param y knight's current y position | |
* | |
* @example possibleDestinations(4, 3) => [[3, 1], [3, 5], [5, 5], [5, 1], [2, 2], [2, 4], [6, 2], [6, 4]] | |
* | |
* @returns all possible coordinates for the knight |