Coverage Summary for Class: ReportAction (it.polimi.ingsw.model)

Class Class, % Method, % Line, %
ReportAction 100% (1/ 1) 100% (4/ 4) 100% (14/ 14)


1 package it.polimi.ingsw.model; 2  3 class ReportAction { 4  5  /** 6  * Player's status 7  */ 8  private final StatusPlayer statusPlayer; 9  10  /** 11  * Last god that changed its status 12  */ 13  private final God god; 14  15  /** 16  * Report actions 17  * @param statusPlayer player's status 18  */ 19  public ReportAction(StatusPlayer statusPlayer) { 20  if (statusPlayer == null) 21  throw new NullPointerException(); 22  this.statusPlayer = statusPlayer; 23  god = God.STANDARD; 24  } 25  26  /** 27  * Report actions 28  * @param statusPlayer Player's status 29  * @param god last god that changed its status 30  */ 31  public ReportAction(StatusPlayer statusPlayer, God god) { 32  if (statusPlayer == null || god == null) 33  throw new NullPointerException(); 34  this.god = god; 35  this.statusPlayer = statusPlayer; 36  } 37  38  /** 39  * Get player's status 40  * @return player' status 41  */ 42  public StatusPlayer getStatusPlayer() { 43  return statusPlayer; 44  } 45  46  /** 47  * Get last god that changed its status 48  * @return last god that changed its status 49  */ 50  public God getGod() { 51  return god; 52  } 53 }