Tower class hierarchy
This commit is contained in:
13
ts/tile.ts
Normal file
13
ts/tile.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export abstract class Tile {
|
||||
elem: HTMLElement;
|
||||
|
||||
constructor(width: number, height: number) {
|
||||
this.elem = document.createElement('div');
|
||||
this.elem.style.gridColumnEnd = `span ${width}`;
|
||||
this.elem.style.gridRowEnd = `span ${height}`;
|
||||
}
|
||||
|
||||
get_elem(): HTMLElement {
|
||||
return this.elem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user