B
Battleship contract
A commit reveal pattern based game
Created on 1st December 2022
•
B
Battleship contract
A commit reveal pattern based game
The problem Battleship contract solves
It is a 2 player game, where there are 2 players.
- Attacker
- Defender
There are 5*5 grid ie. 25 positions.
Defender will choose any 5 positions and place the battleship.
Defender will call choose_square function and pass the merkel root of its choices.
Attacker will guess 5 positions and if the attacker guess more than 2 right positions where the battle ship is place then Attacker will win.
Otherwise defender will win.
Attacker will have to call attack function.
Discussion
Builders also viewed
See more projects on Devfolio