This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract Draughts { | |
enum Colour { Black, White } | |
enum CellContent { Empty, Black, White, BlackKing, WhiteKing } | |
uint constant public size = 10; | |
uint constant public turnLimitTime = 60 * 60; // Seconds to allow for turn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract RockPaperScissors { | |
enum Choice { Rock, Paper, Scissors } | |
enum Outcome { Win, Lose, Draw } | |
address[] private players; | |
mapping(address => Choice) private choices; | |
mapping(address => int) scores; |