Skip to content

Commit

Permalink
feat: CharacterEnum, Player, Role class
Browse files Browse the repository at this point in the history
  • Loading branch information
LapisBerry committed May 29, 2024
1 parent 9132b6e commit f90c910
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.lapisberry.game.entities.characters;

public enum CharacterEnum {
Bart_Cassidy, // *modified // need special turn state when losing a life point Bart can choose take arrow or not take arrow
Black_Jack,
Calamity_Janet,
El_Gringo,
Jesse_Jones,
Jourdonnais,
Kit_Carlson, // *modified // need more turn state to choose player
Lucky_Duke,
Paul_Regret,
Pedro_Ramirez, // *modified // need special turn state when losing a life point Pedro can choose discard arrow or not discard arrow
Rose_Doolan,
Sid_KetChum, // *modified // need more turn state to implement full skill
Slab_The_Killer, // *modified // need special dice state or damage to dice or new dice
Suzy_Lafayette,
Vulture_Sam,
Willy_The_Kid
}
39 changes: 39 additions & 0 deletions src/main/java/com/lapisberry/game/entities/players/Player.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.lapisberry.game.entities.players;

import java.io.Serial;
import java.io.Serializable;

/**
* The {@code Player} class is used for user to know a role and position of other players decide which character to pick.
*/
public class Player implements Serializable {
@Serial
private static final long serialVersionUID = -6540863475427867425L;
// Fields
private final int clientId;
private final String playerName;
private Role role;

// Constructors
public Player(int clientId, String playerName) {
this.clientId = clientId;
this.playerName = playerName;
}

// Getter Setters
public int getClientId() {
return clientId;
}

public String getPlayerName() {
return playerName;
}

public Role getRole() {
return role;
}

public void setRole(Role role) {
this.role = role;
}
}
8 changes: 8 additions & 0 deletions src/main/java/com/lapisberry/game/entities/players/Role.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.lapisberry.game.entities.players;

public enum Role {
EMPEROR,
ROYALIST,
REBEL,
SPY
}

0 comments on commit f90c910

Please sign in to comment.