Coverage Summary for Class: NoEntryTile (it.polimi.ingsw.Model)
Class |
Class, %
|
Method, %
|
Line, %
|
NoEntryTile |
100%
(1/1)
|
100%
(2/2)
|
100%
(3/3)
|
1 package it.polimi.ingsw.Model;
2
3 import java.io.Serial;
4 import java.io.Serializable;
5
6 /**
7 * This is the representation of the game's No entry tile
8 * An {@link IslandGroup} may receive a reference to an object of this type through {@link IslandGroup#addNoEntry(NoEntryTile)}.
9 */
10 public class NoEntryTile implements Serializable {
11 @Serial
12 private static final long serialVersionUID = 124L; // convention: 1 for model, (01 -> 99) for objects
13 private final Card05 home;
14
15 /**
16 * Generate a card and sets its "home"
17 *
18 * @param card {@link Card05} is the home of every No entry tile.
19 */
20 public NoEntryTile(Card05 card) {
21 this.home = card;
22 }
23
24 /**
25 * When called, sends the tile back to its home
26 */
27 public void goHome() {
28 home.tileReset(this);
29 }
30 }