contract DealToken is MintableToken, IDealToken {
    string public constant name = "Deal Token";
    string public constant symbol = "DEAL";
    uint8 public constant decimals = 0;

    uint256 public totalTokensBurnt = 0;

    event TokensSpent(address indexed _from, uint256 _value);

    /**
     * @dev - Empty constructor
     */
    function DealToken() public { }

    /**
     * @dev - Function that allows foreground contract to spend (burn) the tokens.
     * @param _from - Account to withdraw from.
     * @param _value - Number of tokens to withdraw.
     * @return - A boolean that indicates if the operation was successful.
     */
    function spend(address _from, uint256 _value) public returns (bool) {
        require(_value > 0);

        if (balances[_from] < _value || allowed[_from][msg.sender] < _value) {
            return false;
        }

        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        balances[_from] = balances[_from].sub(_value);
        totalTokensBurnt = totalTokensBurnt.add(_value);
        totalSupply = totalSupply.sub(_value);
        TokensSpent(_from, _value);
        return true;
    }

    /**
     * @dev - Allow another contract to spend some tokens on your behalf
     * @param _spender - Contract that will spend the tokens
     * @param _value - Amount of tokens to spend
     * @param _extraData - Additional data to pass to the receiveApproval
     * @return -  A boolean that indicates if the operation was successful.
     */
    function approveAndCall(ITokenRecipient _spender, uint256 _value, bytes _extraData) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        _spender.receiveApproval(msg.sender, _value, this, _extraData);
        return true;
    }
}
function DealToken() public { }

/**
 * @dev - Empty constructor
 */