mapping(uint256 => string) public indexToName; event WinnerResult(string); function getWinner() external returns (bytes32) { indexToName[0] = "player1 win"; indexToName[1] = "player2 win"; indexToName[2] = "tie"; bytes memory params; return _requestRandomness(RequestType.Randomness, params); } function _fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { uint256 winnerIndex = RandcastSDK.roll(randomness, 3); emit WinnerResult(indexToName[winnerIndex]); }