import { Vector } from '../types' ; export class Brick { private brickImage : HTMLImageElement = new Image ( ) ; constructor ( private brickWidth , private brickHeight , private position , private brickEnergy , image ) { this . brickWidth = brickWidth ; this . brickHeight = brickHeight ; this . position = position ; this . brickEnergy = brickEnergy ; this . brickImage . src = image ; } get width ( ) : number { return this . brickWidth ; } get height ( ) : number { return this . brickHeight ; } get pos ( ) : Vector { return this . position ; } get image ( ) : HTMLImageElement { return this . brickImage ; } get energy ( ) : number { return this . brickEnergy ; } set energy ( energy ) { this . brickEnergy = energy ; } }