Coverage Summary for Class: PlayerActionRequest (it.polimi.ingsw.Server.Messages.Events.Requests)
Class |
Class, %
|
Method, %
|
Line, %
|
PlayerActionRequest |
0%
(0/1)
|
0%
(0/2)
|
0%
(0/3)
|
1 package it.polimi.ingsw.Server.Messages.Events.Requests;
2
3 import it.polimi.ingsw.Controller.Actions.PlayerAction;
4
5 import java.io.Serial;
6
7 /**
8 * Represents a Client attempting to run a {@link PlayerAction} on the game
9 */
10 public class PlayerActionRequest extends ClientRequest {
11 @Serial
12 private static final long serialVersionUID = 355L;
13 private final PlayerAction playerAction;
14
15 /**
16 * Construct the request
17 *
18 * @param action the action the user wishes to run
19 */
20 public PlayerActionRequest(PlayerAction action) {
21 this.playerAction = action;
22 }
23
24 /**
25 * Get the user defined action
26 *
27 * @return a {@link PlayerAction} to run on a {@link it.polimi.ingsw.Controller.Controller}
28 */
29 public PlayerAction getAction() {
30 return playerAction;
31 }
32 }