Skip to content

Commit

Permalink
create basic entity classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Oct 21, 2023
1 parent b1ebe31 commit ab74978
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/api/entities/BaseEntity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export class BaseEntity {
name: string
uuid: string

constructor(data: { name: string; uuid: string }) {
this.name = data.name
this.uuid = data.uuid
}
}
7 changes: 7 additions & 0 deletions src/api/entities/Nation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BaseEntity } from "./BaseEntity.js"

export class Nation extends BaseEntity {
constructor(data: any) {
super(data)
}
}
7 changes: 7 additions & 0 deletions src/api/entities/Player.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BaseEntity } from "./BaseEntity.js"

export class Player extends BaseEntity {
constructor(data: any) {
super(data)
}
}
11 changes: 11 additions & 0 deletions src/api/entities/Town.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { BaseEntity } from "./BaseEntity.js"

export class Town {

}

export class DynmapTown extends BaseEntity {
constructor(data: any) {
super(data)
}
}

0 comments on commit ab74978

Please sign in to comment.