mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-19 16:21:45 +03:00
d44457fc32
* bump snarkvm rev * update default gitignore * impl leo execute * bump snarkvm 0.14.5 * modify examples wip * update run.sh examples * impl env file * clippy warning * fix auction example * fix auction example env * generate new private key for new env - tests failing due to env not found err * commit error changes * Fix tests; clippy * Get examples working * leo build checks that build dir is well formed; clippy * Clean up * Update examples/README.md Co-authored-by: d0cd <pranavsaig@gmail.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * do not commit .avm files * use snarkvm commands --------- Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> Co-authored-by: Pranav Gaddamadugu <pranav@aleo.org> Co-authored-by: d0cd <pranavsaig@gmail.com>
25 lines
653 B
Plaintext
25 lines
653 B
Plaintext
program move.aleo;
|
|
|
|
record move:
|
|
owner as address.private;
|
|
incoming_fire_coordinate as u64.private;
|
|
player_1 as address.private;
|
|
player_2 as address.private;
|
|
prev_hit_or_miss as u64.private;
|
|
|
|
|
|
function create_move:
|
|
input r0 as move.record;
|
|
input r1 as u64.private;
|
|
input r2 as u64.private;
|
|
is.eq r0.player_1 r0.owner into r3;
|
|
ternary r3 r0.player_2 r0.player_1 into r4;
|
|
cast r4 r1 r0.player_2 r0.player_1 r2 into r5 as move.record;
|
|
output r5 as move.record;
|
|
|
|
|
|
function start_game:
|
|
input r0 as address.private;
|
|
cast r0 0u64 self.caller r0 0u64 into r1 as move.record;
|
|
output r1 as move.record;
|