"Vorgada Treasure Hunt" is a simple game that applies zero-knowledge proof and multi-party computation. Players need to find as many treasures as possible within 50 steps based on the hints at each coordinate. This is a partially hidden information game that does not require a trusted third party to complete.
【Screenshot】
Frontend code: https://github.com/justinnzhao/TreasureHuntV1
Demo link: https://treasure-hunt-v1.vercel.app/
Initialization and Circuit Generation:
template MatrixCheck() {
signal private input matrix[4][6];
signal input coordinate[2];
signal input a;
signal output res;
function checkNumber(private a, private b) {
return a === b ? 1 : 0;
}
res <== checkNumber(matrix[coordinate[0]][coordinate[1]], a);
}
component main = MatrixCheck();
Running the Circuit: