statechannels
statechannels copied to clipboard
Battleship without a board - Things to do
Game is not yet finished:
- We need to implement a "reset" function. This discards all information about the game and transitions back to Setup.
- We need to include more Events - i.e. publish signature for a sunk ship via an Event.
- We need unit tests for the battleship game - make sure the logic is correct.
State channel work to do:
- We may need an auxiliary contract - that can "create the state channel contract" and pass back the contract address to the battleship game.
- We need to create a "battleship.lock() and battleship.unlock()". This should be straight forward to do.
We'll need to consider what to do with the "now" time. This will be awkward to do with a private network etc. We should have two extra timers called timer_dispute and timer_extratime. The former enforces the fixed time period for a state channel dispute process and timer_extratime should be added any timers in the battleship game - to provide time to trigger a dispute/resolve it.
i.e. timer_challenge = timer_challenge + timer_extratime in the "lock" function, and timer_challenge = timer_challenge - timer_extratime in the "unlock" function.