//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.4.18; contract User { modifier enoughmoney { require(balanceOf(msg.sender>=1)) } function DefineUserA() public enoughmoney{ account PlayerA = msg.sender; } function DefineUserB() public enoughmoney{ require(msg.sender !== PlayerA); account PlayerB = msg.sender; } } contract Fields is User { struct Field { uint row; uint column; bytes32 value; } modifier occupation { require(value.Field[i, k] == "N"); } function Fieldchange (uint _i,uint _k, bytes32 _newValue){ value.Field[i,k,"N"] = _newValue; } for (uint i=1, i<=3, i++) { for (uint k=1, k<=3, k++) { Field NewField = Field(i,k,"N"); } } function PlayA(uint _i, uint _k) public occupation{ require(msg.sender == PlayerA); Fieldchange (_i, _k, "A"); } function PlayB(uint _i, uint _k) public occupation{ require(msg.sender == PlayerB); Fieldchange (_i, _k, "B"); }
0.4.18