public function addCancel(MoveInterface $move)
    {
        foreach ($this->cancelAbilities as $cancelAbility) {
            if ($cancelAbility->equals($move)) {
                throw new LogicException(
                    sprintf('Cancel ability "%s" already defined', $move->getName())
                );
            }
        }

        $this->cancelAbilities[] = $move;

        return $this;
    }
public function addCancel(MoveInterface $move)
    {
        foreach ($this->cancelAbilities as $cancelAbility) {
            if ($cancelAbility->equals($move)) {
                throw new LogicException(
                    sprintf('Cancel ability "%s" already defined', $move->getName())
                );
            }
        }

        $this->cancelAbilities[] = $move;

        return $this;
    }
public function addCancel ( MoveInterface $ move ) { foreach ( $ this -> cancelAbilities as $ cancelAbility ) { if ( $ cancelAbility -> equals ( $ move ) ) { throw new LogicException ( sprintf ( 'Cancel ability "%s" already defined' , $ move -> getName ( ) ) ) ; } } $ this -> cancelAbilities [ ] = $ move ; return $ this ; }
Add a cancel ability.

@param MoveInterface $move

@return static
Add a cancel ability .