DO-49 매치 메이킹 시 닉네임 교환토록 처리

This commit is contained in:
fiore 2025-03-25 09:19:30 +09:00
parent 43a7ecfaa6
commit 072876bbf0

View File

@ -1,32 +0,0 @@
/**
* 게임 클래스
*/
class Room {
/**
* 새로운 객체 생성
* @param {string} roomId - 고유 ID
* @param {string} hostId - 방장 소켓 ID
* @param {number} rating - 방장의 급수 (1-18)
*/
constructor(roomId, hostId, rating) {
this.roomId = roomId;
this.hostId = hostId;
this.rating = rating;
this.createdAt = new Date();
}
/**
* 해당 방의 정보를 객체로 반환
* @returns {Object} 정보 객체
*/
toJSON() {
return {
roomId: this.roomId,
hostId: this.hostId,
rating: this.rating,
createdAt: this.createdAt
};
}
}
module.exports = Room;