Created
June 27, 2016 19:55
-
-
Save iGitScor/517f10545b56a07dbf81e85417641d03 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
export class Dimension { | |
width: int; | |
height: int; | |
constructor(width: int, height: int) { | |
this.width = width; | |
this.height = height; | |
} | |
} |
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 Point { | |
latitude: int; | |
longitude: int; | |
constructor(latitude: int, longitude: int) { | |
this.latitude = latitude; | |
this.longitude = longitude; | |
} | |
} |
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
import { Point } from 'Point.js'; | |
import { Dimension } from 'Dimension.js'; | |
export class Rect { | |
position: Point; | |
dimension: Dimension; | |
constructor(position: Point, dimension: Dimension) { | |
this.position = position; | |
this.dimension = dimension; | |
} | |
} |
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
import { Rect } from 'Rect.js'; | |
import { Color } from 'Color.js'; | |
export class SimpleMap { | |
surface: Rect; | |
colors: Array<>Color; | |
constructor(surface: Rect, colors: Array<Color>, ...) { | |
this.surface = surface; | |
this.colors = colors; | |
} | |
private isTiny():boolean { | |
return true; | |
} | |
isMulticoloredMap():boolean { | |
// TODO | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment