Coverage Summary for Class: DeclarePlayerRequest (it.polimi.ingsw.Server.Messages.Events.Requests)
Class |
Class, %
|
Method, %
|
Line, %
|
DeclarePlayerRequest |
0%
(0/1)
|
0%
(0/2)
|
0%
(0/3)
|
1 package it.polimi.ingsw.Server.Messages.Events.Requests;
2
3 import java.io.Serial;
4
5 /**
6 * Represents a Client triying to set its nickname after a successful connection to the server.
7 */
8 public class DeclarePlayerRequest extends ClientRequest {
9 @Serial
10 private static final long serialVersionUID = 354L;
11 private final String nickname;
12
13 /**
14 * Construct the request
15 *
16 * @param nickname the nickname the user wishes to set
17 */
18 public DeclarePlayerRequest(String nickname) {
19 this.nickname = nickname;
20 }
21
22 /**
23 * Get the nickname the user selected
24 *
25 * @return the nickname of the user
26 */
27 public String getNickname() {
28 return nickname;
29 }
30 }