Skip to content

Instantly share code, notes, and snippets.

@iGitScor
Created June 27, 2016 19:55
Show Gist options
  • Save iGitScor/517f10545b56a07dbf81e85417641d03 to your computer and use it in GitHub Desktop.
Save iGitScor/517f10545b56a07dbf81e85417641d03 to your computer and use it in GitHub Desktop.
export class Dimension {
width: int;
height: int;
constructor(width: int, height: int) {
this.width = width;
this.height = height;
}
}
export class Point {
latitude: int;
longitude: int;
constructor(latitude: int, longitude: int) {
this.latitude = latitude;
this.longitude = longitude;
}
}
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;
}
}
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