Coverage Summary for Class: ModelUpdated (it.polimi.ingsw.Server.Messages.ServerResponses)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| ModelUpdated | 0% (0/1) | 0% (0/2) | 0% (0/3) |
1 package it.polimi.ingsw.Server.Messages.ServerResponses; 2 3 import it.polimi.ingsw.Model.Model; 4 5 import java.io.Serial; 6 7 /** 8 * This Response is generated upon an edit of the game's model. Therefore, it is {@link FixedStatusResponse} 9 */ 10 public class ModelUpdated extends FixedStatusResponse { 11 @Serial 12 private static final long serialVersionUID = 311L; 13 14 private final Model model; 15 16 /** 17 * Prepare a response with the updated model 18 * 19 * @param model reference to the updated model 20 */ 21 public ModelUpdated(Model model) { 22 this.model = model; 23 } 24 25 /** 26 * Get the model 27 * 28 * @return the copy of the {@link Model} that was updated 29 */ 30 public Model getModel() { 31 return this.model.copy(); 32 } 33 34 }