Coverage Summary for Class: GameOver (it.polimi.ingsw.Server.Messages.ServerResponses)
Class |
Class, %
|
Method, %
|
Line, %
|
GameOver |
0%
(0/1)
|
0%
(0/2)
|
0%
(0/3)
|
1 package it.polimi.ingsw.Server.Messages.ServerResponses;
2
3 import java.io.Serial;
4 import java.util.List;
5
6 /**
7 * This Response is generated when a lobby's game is over and is sent to the lobby's clients.
8 * Therefore, it is {@link FixedStatusResponse}
9 */
10 public class GameOver extends FixedStatusResponse {
11 @Serial
12 private static final long serialVersionUID = 315L;
13 private final List<String> winners;
14
15 /**
16 * Create the response
17 *
18 * @param winners the winners of the game
19 */
20 public GameOver(List<String> winners) {
21 this.winners = winners;
22 }
23
24 /**
25 * Get the winners of the game
26 *
27 * @return an Unmodifiable {@link List} containing the list of winners for the game
28 */
29 public List<String> getWinners() {
30 return List.copyOf(this.winners);
31 }
32 }