makeBorderSprite () {
    if (this.modelTile.owner === null) return null

    var border = this.game.make.graphics()
    border.beginFill(this.borderColour, 1)

    var tile = this.modelTile
    var structure = this.modelTile.owner
    var width = this.tileSize.width * 2
    var height = this.tileSize.height * 2
    var thickness = 6

    if (!structure.ownsTileAt(tile.x + 1, tile.y)) {
      border.drawRect(width - thickness, 0, thickness, height)
    }
    if (!structure.ownsTileAt(tile.x - 1, tile.y)) {
      border.drawRect(0, 0, thickness, height)
    }
    if (!structure.ownsTileAt(tile.x, tile.y + 1)) {
      border.drawRect(0, height - thickness, width, thickness)
    }
    if (!structure.ownsTileAt(tile.x, tile.y - 1)) {
      border.drawRect(0, 0, width, thickness)
    }
    border.endFill()
    
    return this.tileSprite.addChild(border)
  }
/**
   * creates border graphics based on the surrounding tiles
   * @return {Phaser.Graphics}
   */
creates border graphics based on the surrounding tiles
@return {Phaser.Graphics}
creates border graphics based on the surrounding tiles @return { Phaser . Graphics }
makeBorderSprite () {
    if (this.modelTile.owner === null) return null
    var border = this.game.make.graphics()
    border.beginFill(this.borderColour, 1)
    var tile = this.modelTile
    var structure = this.modelTile.owner
    var width = this.tileSize.width * 2
    var height = this.tileSize.height * 2
    var thickness = 6
    if (!structure.ownsTileAt(tile.x + 1, tile.y)) {
      border.drawRect(width - thickness, 0, thickness, height)
    }
    if (!structure.ownsTileAt(tile.x - 1, tile.y)) {
      border.drawRect(0, 0, thickness, height)
    }
    if (!structure.ownsTileAt(tile.x, tile.y + 1)) {
      border.drawRect(0, height - thickness, width, thickness)
    }
    if (!structure.ownsTileAt(tile.x, tile.y - 1)) {
      border.drawRect(0, 0, width, thickness)
    }
    border.endFill()
    return this.tileSprite.addChild(border)
  }
makeBorderSprite ( ) { if ( this . modelTile . owner === null ) return null var border = this . game . make . graphics ( ) border . beginFill ( this . borderColour , 1 ) var tile = this . modelTile var structure = this . modelTile . owner var width = this . tileSize . width * 2 var height = this . tileSize . height * 2 var thickness = 6 if ( ! structure . ownsTileAt ( tile . x + 1 , tile . y ) ) { border . drawRect ( width - thickness , 0 , thickness , height ) } if ( ! structure . ownsTileAt ( tile . x - 1 , tile . y ) ) { border . drawRect ( 0 , 0 , thickness , height ) } if ( ! structure . ownsTileAt ( tile . x , tile . y + 1 ) ) { border . drawRect ( 0 , height - thickness , width , thickness ) } if ( ! structure . ownsTileAt ( tile . x , tile . y - 1 ) ) { border . drawRect ( 0 , 0 , width , thickness ) } border . endFill ( ) return this . tileSprite . addChild ( border ) }
creates border graphics based on the surrounding tiles
 @return {Phaser.Graphics}
creates border graphics based on the surrounding tiles @return { Phaser . Graphics }