예제 #1
0
파일: round.php 프로젝트: nmalkin/basset
 /** 
  * Returns a label identifying this round in the game.
  * The label is unique to steps in this game.
  * 
  * Currently, the format for the label is 'step_X[_repetition_Y]',
  * where X is the order of this step.
  * 
  * @throws InvalidArgumentException if this step is repeated, but no repetition was supplied; or if this is an invalid repetition
  * @return string unique label for this step and repetition
  */
 public function label()
 {
     $step_identifier = $this->step->__toString();
     //TODO: a better idea might be to use the step code rather than its order
     if ($this->step->isRepeated()) {
         return $step_identifier . '_repetition_' . $this->repetition;
     } else {
         return $step_identifier;
     }
 }