First update.

This commit is contained in:
2025-10-11 14:45:08 +08:00
commit 6aa8fb818a
22 changed files with 4036 additions and 0 deletions

33
Player.js Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Player = void 0;
const DEFAULT_HP = 100;
class Player {
constructor(aName, aSocketId) {
this.mCards = [];
this.mStrength = 0;
this.mStamina = 0;
this.mAgile = 0;
this.mAttack = 0;
this.mDefener = 0;
this.mHp = DEFAULT_HP;
this.mPrepared = false;
this.mCurrentEnemy = "";
this.mIsResting = false;
this.mRank = -1;
this.mCharacterName = "";
this.mPlayerName = aName;
this.mSocketId = aSocketId;
}
setPlayerInfo(aStrength, aStamina, aAgile, aCards) {
this.mStrength = aStrength;
this.mStamina = aStamina;
this.mAgile = aAgile;
this.mCards = aCards;
this.mPrepared = true;
}
setPlayerSocketId(aId) {
this.mSocketId = aId;
}
}
exports.Player = Player;