-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CharacterEnum, Player, Role class
- Loading branch information
1 parent
9132b6e
commit f90c910
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/java/com/lapisberry/game/entities/characters/CharacterEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
39
src/main/java/com/lapisberry/game/entities/players/Player.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |