contract RNG{

    /** @dev Contribute to the reward of a random number.
     *  @param _block Block the random number is linked to.
     */
    function contribute(uint _block) public payable;

    /** @dev Request a random number.
     *  @param _block Block linked to the request.
     */
    function requestRN(uint _block) public payable {
        contribute(_block);
    }

    /** @dev Get the random number.
     *  @param _block Block the random number is linked to.
     *  @return RN Random Number. If the number is not ready or has not been required 0 instead.
     */
    function getRN(uint _block) public returns (uint RN);

    /** @dev Get a uncorrelated random number. Act like getRN but give a different number for each sender.
     *  This is to prevent users from getting correlated numbers.
     *  @param _block Block the random number is linked to.
     *  @return RN Random Number. If the number is not ready or has not been required 0 instead.
     */
    function getUncorrelatedRN(uint _block) public returns (uint RN) {
        uint baseRN=getRN(_block);
        if (baseRN==0)
            return 0;
        else
            return uint(keccak256(msg.sender,baseRN));
    }

 }
function requestRN(uint _block) public payable {
        contribute(_block);
    }
/** @dev Request a random number.
 *  @param _block Block linked to the request.
 */