pragma solidity ^0.4.17; contract poker { enum State {UNCERTAIN, VALID, ALLIN, FOLD} string[52] deck; struct Player { string[2] hand; uint16 tokens; State playerState; address id; } /*constructor() public { hand = ["", ""]; tokens = 100; playerState = State.UNCERTAIN; uint i; uint j; uint pos = 0; string[4] type = ["c", "t", "h", "p"] for(i=0; i<type.length; i++) { for(j=2; j<15; i++) { deck[pos] = type[i] + j; pos++; } } }*/ function uintToBytes(uint v) public pure returns (bytes32 ret) { if (v == 0) { ret = '0'; } else { while (v > 0) { ret = bytes32(uint(ret) / (2 ** 8)); ret |= bytes32(((v % 10) + 48) * 2 ** (8 * 31)); v /= 10; } } return ret; } // https://solidity.readthedocs.io/en/develop/miscellaneous.html?highlight=Pure function caress() public pure returns (string) { return "OKTEST"; } }
0.4.18