Writing our first smart contract
Implement a simple rock paper scissors contract with no privacy
In this lesson we are going to implement rock paper scissors on ethereum using solidity. Have a go at implementing it yourself first before looking at the solution.
Interface of the contract:
1
pragma solidity 0.6.0;
2
3
contract Game {
4
function play(uint8 choice) external {}
5
6
function evaluate(address alice, address bob)
7
external
8
view
9
returns (address)
10
{}
11
}