Skip to content

Commit

Permalink
mock state change for note
Browse files Browse the repository at this point in the history
  • Loading branch information
Created-for-a-purpose committed Jun 28, 2024
1 parent f21b7fc commit 7a66994
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/contracts/notes/game/inter_unmask.masm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ const.NO_OF_CARDS=3
const.REQUESTER_INFO_SLOT=102
const.TEMP_CARD_SLOT=103

proc.tx_state_change
push.254 exec.account::get_item
add.1
push.254 exec.account::set_item
dropw dropw
end

proc.inter_unmask
# => [card_index, ca', cb']
swap push.G inv
Expand Down Expand Up @@ -76,4 +83,6 @@ begin
call.set_requester_data

dropw dropw

call.tx_state_change dropw
end
9 changes: 9 additions & 0 deletions lib/contracts/notes/game/send_community_cards.masm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ const.TEMP_CARD_SLOT=103
const.PLAYER_DATA_SLOT=56
const.PHASE_DATA_SLOT=57

proc.tx_state_change
push.254 exec.account::get_item
add.1
push.254 exec.account::set_item
dropw dropw
end

proc.receive_cards
exec.account::set_item
# => [R, V]
Expand Down Expand Up @@ -57,4 +64,6 @@ begin
call.set_phase

dropw dropw

call.tx_state_change dropw
end
9 changes: 9 additions & 0 deletions lib/contracts/notes/game/send_unmasked_cards.masm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ const.NO_OF_CARDS=3
const.TEMP_CARD_SLOT=103
const.PLAYER_DATA_SLOT=56

proc.tx_state_change
push.254 exec.account::get_item
add.1
push.254 exec.account::set_item
dropw dropw
end

proc.receive_cards
exec.account::set_item
# => [R, V]
Expand Down Expand Up @@ -57,4 +64,6 @@ begin
call.increment_action_type

dropw dropw

call.tx_state_change dropw
end
9 changes: 9 additions & 0 deletions lib/contracts/notes/game/set_community_cards.masm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ use.miden::contracts::wallets::basic->wallet

const.NO_OF_CARDS=3

proc.tx_state_change
push.254 exec.account::get_item
add.1
push.254 exec.account::set_item
dropw dropw
end

proc.set_cards
# => [card_index, Cb, Ca]
push.0 dup movup.2
Expand Down Expand Up @@ -47,5 +54,7 @@ begin
loc_store.0
end

call.tx_state_change dropw

dropw
end

0 comments on commit 7a66994

Please sign in to comment.