diff options
-rw-r--r-- | src/Tile/Tile.ts | 6 | ||||
-rw-r--r-- | src/Tile/TileOnBoard.ts | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/Tile/Tile.ts b/src/Tile/Tile.ts index 3a2d350..5bc6a7a 100644 --- a/src/Tile/Tile.ts +++ b/src/Tile/Tile.ts @@ -20,7 +20,11 @@ export default class Tile { sides: [Feature, Feature, Feature, Feature]; shield?: boolean; - public constructor(center: Feature, sides: [Feature, Feature, Feature, Feature], shield = false) { + public constructor( + center: Feature, + sides: [Feature, Feature, Feature, Feature], + shield = false + ) { this.center = center; this.sides = sides; this.shield = shield; diff --git a/src/Tile/TileOnBoard.ts b/src/Tile/TileOnBoard.ts index fb0817c..374ae95 100644 --- a/src/Tile/TileOnBoard.ts +++ b/src/Tile/TileOnBoard.ts @@ -16,9 +16,17 @@ export default class TileOnBoard extends Tile { y: number; } - constructor(center: Feature, sides: [Feature, Feature, Feature, Feature], shield = false, orientation = 0) { + constructor( + center: Feature, + sides: [Feature, Feature, Feature, Feature], + shield = false, + position = { x: 0, y: 0 }, + orientation = 0 + ) { super(center, sides, shield); + this.position = position; this.orientation = orientation; + this.neighbors = [null, null, null, null]; } getSide(direction: Direction) { |