contract Rock is MintableToken {

    string public constant name = "Rocket Token";

    string public constant symbol = "ROCK";

    bool public transferEnabled = false;

    uint8 public constant decimals = 18;

    event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 amount);

    function Rock(){
        Round memory roundone = Round({total : 4170000 ether, active: true, finished: false, issuedTokens : 0, startMinimumTime: 0});
        Round memory roundtwo = Round({total : 6945000 ether, active: false, finished: false, issuedTokens : 0, startMinimumTime: 1534291200 });
        Round memory roundthree = Round({total : 13885000 ether, active: false, finished: false, issuedTokens : 0, startMinimumTime: 0});
        rounds.push(roundone);
        rounds.push(roundtwo);
        rounds.push(roundthree);
    }

    /**
    * @dev transfer token for a specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint _value) whenNotPaused canTransfer returns (bool) {
        require(_to != address(this));
        return super.transfer(_to, _value);
    }

    /**
    * @dev Transfer tokens from one address to another
    * @param _from address The address which you want to send tokens from
    * @param _to address The address which you want to transfer to
    * @param _value uint256 the amout of tokens to be transfered
    */
    function transferFrom(address _from, address _to, uint _value) whenNotPaused canTransfer returns (bool) {
        require(_to != address(this));
        return super.transferFrom(_from, _to, _value);
    }

    /**
     * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
     * @param _spender The address which will spend the funds.
     * @param _value The amount of tokens to be spent.
     */
    function approve(address _spender, uint256 _value) whenNotPaused returns (bool) {
        return super.approve(_spender, _value);
    }

    /**
     * @dev Modifier to make a function callable only when the transfer is enabled.
     */
    modifier canTransfer() {
        require(transferEnabled);
        _;
    }

    /**
    * @dev Function to start transfering tokens.
    * @return True if the operation was successful.
    */
    function enableTransfer() onlyOwner returns (bool) {
        transferEnabled = true;
        return true;
    }

    /**
    * @dev Function to stop current round.
    * @return True if the operation was successful.
    */
    function finishRound() onlyOwner returns (bool) {
        require(currentRound - 1 < 3);
        require(rounds[currentRound-1].active);

        uint256 tokensToBurn = rounds[currentRound-1].total.sub(rounds[currentRound-1].issuedTokens);

        rounds[currentRound-1].active = false;
        rounds[currentRound-1].finished = true;
        maxTokensToMint = maxTokensToMint.sub(tokensToBurn);

        return true;
    }

    /**
    * @dev Function to start new round.
    * @return True if the operation was successful.
    */
    function startRound() onlyOwner returns (bool) {
        require(currentRound - 1 < 2);
        require(rounds[currentRound-1].finished);
        if(rounds[currentRound].startMinimumTime > 0){
            require(block.timestamp >= rounds[currentRound].startMinimumTime);
        }

        currentRound ++;
        rounds[currentRound-1].active = true;

        return true;
    }

    function getCurrentRoundTotal() constant returns (uint256 total) {
        return rounds[currentRound-1].total;
    }

    function getCurrentRoundIsFinished() constant returns (bool) {
        return rounds[currentRound-1].finished;
    }

    function getCurrentRoundIsActive() constant returns (bool) {
        return rounds[currentRound-1].active;
    }

    function getCurrentRoundMinimumTime() constant returns (uint256) {
        return rounds[currentRound-1].startMinimumTime;
    }

    function getCurrentRoundIssued() constant returns (uint256 issued) {
        return rounds[currentRound-1].issuedTokens;
    }

}
function transfer(address _to, uint _value) whenNotPaused canTransfer returns (bool) {
    require(_to != address(this));
    return super.transfer(_to, _value);
}

/**
 * @dev transfer token for a specified address
 * @param _to The address to transfer to.
 * @param _value The amount to be transferred.
 */