src/Player.php
public function getLastMoveIndex()
    {
        $move_history = $this->getMoveHistory();

        // get last value
        $last_move = end($move_history);

        // reset pointer
        reset($this->moves);

        return $last_move;
    }
public function getLastMoveIndex()
    {
        $move_history = $this->getMoveHistory();

        // get last value
        $last_move = end($move_history);

        // reset pointer
        reset($this->moves);

        return $last_move;
    }
public function getLastMoveIndex ( ) { $ move_history = $ this -> getMoveHistory ( ) ; // get last value $ last_move = end ( $ move_history ) ; // reset pointer reset ( $ this -> moves ) ; return $ last_move ; }
Get Last Move
@return mixed
Get Last Move