Let’s Make An Ethereum Simulation Game Part 3

The Front End

Alex Roan
Coinmonks
Published in
6 min readApr 2, 2020

--

Recap

In part one I outlined the idea for a Tennis Manager simulation game on the Ethereum Blockchain. I created the ERC721 Token and the TrainableTennisPlayer contract which enables owners to increase their player stats by training or resting.

Part two walked through the introduction of the CompetingTennisPlayercontract, responsible for calculating the winners of matches between players.

Since then, I’ve written unit tests for those contracts. They are by no means complete, but I wanted to try building out a usable group of contracts as soon as possible to test out a basic front. If you’d like to help out with testing and building the application, check out the Github repo.

I’ve also altered the TennisPlayerBase contract to extend ERC721Enumerable, instead of the standard ERC721 token provided by Openzeppelin. This enables the game to retrieve all tokens owned by an address using _tokensOfOwner(address). Implementing this means not requiring the user to remember their token ID every time they log in.

As I mentioned in the previous article, I’m looking forward to getting a rudimentary interface up and running to start interacting with the game.

Pulling It Together

--

--

Alex Roan
Coinmonks

CoFounder at Cyfrin. Previously: Chainlink Labs.