Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 3x 4x 4x 10x 19x 3x 1x 1x 2x 3x 3x 1x 1x 2x 3x | import AbsClock from "./AbsClock"; export class Clock1 implements AbsClock { private time = 0 public reset () {this.time = 0} public tick () { this.time++ } public getTime(): number { return this.time } } // counts down from 0 export class Clock2 implements AbsClock { private time = 0 public reset () {this.time = 0} public tick () { this.time-- } public getTime () {return (0 - this.time)} } // counts from 42 export class Clock3 implements AbsClock { private time = 42 public reset () {this.time = 42} // I originally put a 0 here :) public tick () { this.time++ } public getTime () {return this.time - 42} } |