Shigoto-dev19 / ZK-Battleships-Solana

First decentralized & private Battleships game on Solana. Honorable Mention recognition in Solana Grizzlython Hackathon
https://solana.com/news/solana-grizzlython-winners?utm_source=Iterable&utm_medium=email&utm_campaign=campaign_6567415#:~:text=Pet%20Legends-,Zk%20Battleships,-Little%20Bonkers
25 stars 4 forks source link

Move to init object and store as attribute of the class #12

Closed ananas-block closed 1 year ago

ananas-block commented 1 year ago

https://github.com/Shigoto-dev19/ZK-Battleships-Solana/blob/6653dee2976ecbdcff0a48529c79a9b5dd4e7685/src/battleShipClient.ts#L76

const boardHash = await mimcSponge.multiHash(board.flat());

should be

const boardHash = await this.mimcSponge.multiHash(board.flat());

Shigoto-dev19 commented 1 year ago

I solved it as BattleShipClient.mimcSponge because the initialize method is static