Skip to content

Commit

Permalink
✨ FEAT. 루미큐브 메인로직 구현
Browse files Browse the repository at this point in the history
플레이어 객체에 서버 인덱스 번호 추가

Related to : #1
  • Loading branch information
junhaa committed Dec 16, 2023
1 parent b63e1bc commit 408a079
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Model/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ public class Player {
private String name; // 유저의 이름
private List<Tile> tiles; // 유저가 가지고 있는 타일들

private int playerIdx = -1; // players 인덱스 번호

private int handlerIdx = -1; // clientHandler 인덱스 번호

// 유저 클래스의 생성자
public Player(String name) {
this.name = name;
Expand All @@ -34,5 +38,21 @@ public void removeTile(Tile tile) {
tiles.remove(tile);
}

public int getHandlerIdx() {
return handlerIdx;
}

public void setHandlerIdx(int handlerIdx) {
this.handlerIdx = handlerIdx;
}

public int getPlayerIdx() {
return playerIdx;
}

public void setPlayerIdx(int playerIdx) {
this.playerIdx = playerIdx;
}

// 추가 유저 행동 메서드
}

0 comments on commit 408a079

Please sign in to comment.