diff --git a/apps/server/src/entities/Player.ts b/apps/server/src/entities/Player.ts new file mode 100644 index 0000000..da5e973 --- /dev/null +++ b/apps/server/src/entities/Player.ts @@ -0,0 +1,15 @@ +// src/entities/Player.ts +export class Player { + public id: string; + public x: number; + public y: number; + public color: string; + + constructor(id: string) { + this.id = id; + this.x = 0; + this.y = 0; + // ランダムな色をつけるとおしゃれです + this.color = '#' + Math.floor(Math.random()*16777215).toString(16); + } +} \ No newline at end of file