import buildingTypes from '../config/buildings'
import Resources from '../cgt/resources'

export default class Building {
    constructor(type) {
        this.config = buildingTypes[type]
        this.level = 0
        this.type = type

        const imageData = this.config.images[this.level]
        this.image = {
            img: Resources.get(imageData),
            x: -70,
            y: -70,
            w: 140,
            h: 70
        }
    }

    draw(ctx) {
        ctx.drawImage(this.image.img, this.image.x, this.image.y, this.image.w, this.image.h)
    }

    update() {}
}
