original_string: public function play($player, $move)
      {
          if (!$this->isPlayerTurn($player)) {
              throw new AwaleException('Not your turn.');
          }
  
          if (0 === $this->grid[$player]['seeds'][$move]) {
              throw new AwaleException('This container is empty.');
          }
  
          $this->checkMustFeedOpponentRule($player, $move);
  
          $this
              ->move($player, $move)
              ->setLastMove(array(
                  'player' => $player,
                  'move' => $move,
              ))
              ->changePlayerTurn()
          ;
  
          if (!$this->hasSeeds(1 - $this->currentPlayer) && !$this->canFeedOpponent($this->currentPlayer)) {
              $this->storeRemainingSeeds($this->currentPlayer);
          }
  
          return $this;
      }
code: public function play($player, $move)
      {
          if (!$this->isPlayerTurn($player)) {
              throw new AwaleException('Not your turn.');
          }
  
          if (0 === $this->grid[$player]['seeds'][$move]) {
              throw new AwaleException('This container is empty.');
          }
  
          $this->checkMustFeedOpponentRule($player, $move);
  
          $this
              ->move($player, $move)
              ->setLastMove(array(
                  'player' => $player,
                  'move' => $move,
              ))
              ->changePlayerTurn()
          ;
  
          if (!$this->hasSeeds(1 - $this->currentPlayer) && !$this->canFeedOpponent($this->currentPlayer)) {
              $this->storeRemainingSeeds($this->currentPlayer);
          }
  
          return $this;
      }
code_tokens: public function play ( $ player , $ move ) { if ( ! $ this -> isPlayerTurn ( $ player ) ) { throw new AwaleException ( 'Not your turn.' ) ; } if ( 0 === $ this -> grid [ $ player ] [ 'seeds' ] [ $ move ] ) { throw new AwaleException ( 'This container is empty.' ) ; } $ this -> checkMustFeedOpponentRule ( $ player , $ move ) ; $ this -> move ( $ player , $ move ) -> setLastMove ( array ( 'player' => $ player , 'move' => $ move , ) ) -> changePlayerTurn ( ) ; if ( ! $ this -> hasSeeds ( 1 - $ this -> currentPlayer ) && ! $ this -> canFeedOpponent ( $ this -> currentPlayer ) ) { $ this -> storeRemainingSeeds ( $ this -> currentPlayer ) ; } return $ this ; }
docstring: Play a turn, check current player turn.
  
  @param int $player
  @param int $move
  
  @return self
  
  @throws AwaleException on invalid move.
docstring_tokens: Play a turn check current player turn .