Skip to content

Instantly share code, notes, and snippets.

View nateawelch's full-sized avatar

Nate Welch nateawelch

  • Portland, Maine, United States
View GitHub Profile
@nateawelch
nateawelch / BattleHash.sol
Created April 21, 2018 20:58 — forked from noman-land/BattleHash.sol
Board is 2x2 for testing purposes, it will be 10x10 eventually.
pragma experimental ABIEncoderV2;
pragma solidity ^0.4.23;
contract BattleHash {
uint256 public numGames;
modifier validShot(uint256 gameId) {
Game storage game = games[gameId];
address lastShooter = getLastShooter(game);