Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240828 demo panic ii #15

Merged
merged 61 commits into from
Sep 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1219001
Add a local move for to local ui. We need to route info into it.
prozacchiwawa Aug 20, 2024
b566b8a
Should be enough to convey the right info to the ui receiver
prozacchiwawa Aug 21, 2024
f111105
Separate endpoint for player update taking a player id, separate play…
prozacchiwawa Aug 21, 2024
b0fa644
checkpoint
prozacchiwawa Aug 22, 2024
1571243
Better display, getting turn order and data decoding better
prozacchiwawa Aug 23, 2024
c64e1bd
Checkpoint after adding messages properly. Despite it being a 'their…
prozacchiwawa Aug 23, 2024
72fa669
We now present the cards to each person (without bugs) from each pers…
prozacchiwawa Aug 23, 2024
695b3e9
fmt + clippy
prozacchiwawa Aug 23, 2024
89bde34
Can play fully on auto. player.js is probably the worst code i have …
prozacchiwawa Aug 24, 2024
ab3c311
Fixed non-matching cards in some cases in the demo app. Ultimately n…
prozacchiwawa Aug 27, 2024
09d94b6
Move calpoker decoding code to new source file
prozacchiwawa Aug 27, 2024
c3ac40e
Checkpoint, more moving, integrated the output decoder i made earlier
prozacchiwawa Aug 27, 2024
c08f137
minus one is a valid outcome, so make a nice enum for alice, bob, tie…
prozacchiwawa Aug 27, 2024
8feb6b4
Whole game working to completion in the demo
prozacchiwawa Aug 28, 2024
5d9f28f
Merge up
prozacchiwawa Aug 28, 2024
434b09d
Merge branch 'active' into 20240826-demo-panic
prozacchiwawa Aug 28, 2024
e2b25d9
fmt
prozacchiwawa Aug 28, 2024
65287ca
fmt + clippy
prozacchiwawa Aug 28, 2024
8c23c69
Demo
prozacchiwawa Aug 28, 2024
3989ed1
Merge up
prozacchiwawa Aug 28, 2024
d0158dc
Fixes
prozacchiwawa Aug 28, 2024
8802a6b
More
prozacchiwawa Aug 28, 2024
16781ac
fmt
prozacchiwawa Aug 28, 2024
6029ecb
Fix
prozacchiwawa Aug 28, 2024
5de65ba
Updates for refactoring
prozacchiwawa Aug 29, 2024
9229e72
swizzle which fields are passed on so they line up in our win determi…
prozacchiwawa Aug 29, 2024
cb0744a
fmt
prozacchiwawa Aug 29, 2024
22094ae
clippy
prozacchiwawa Aug 29, 2024
0a7e662
Some updates
prozacchiwawa Aug 29, 2024
434d5d8
Commit up here, much better way of keeping state
prozacchiwawa Aug 31, 2024
cbd6e2c
more improvement on state keeping, drastically simpler
prozacchiwawa Aug 31, 2024
c20d5ca
try fix for mac simulator
prozacchiwawa Sep 2, 2024
5c68114
fix
prozacchiwawa Sep 2, 2024
d0172a1
Insert computed python path at beginning of sys.path
aqk Sep 2, 2024
bd4e172
fmt
prozacchiwawa Sep 2, 2024
c3fbf1b
Merge remote-tracking branch 'chia/20240830-demo-panic-iii' into 2024…
aqk Sep 2, 2024
e363330
fmt
aqk Sep 2, 2024
efdc047
Merge pull request #16 from aqk/20240830-demo-panic-iii
prozacchiwawa Sep 2, 2024
eeb488c
Resolve startup race on macos
aqk Sep 2, 2024
2233058
Better: we're now passing on plausible decoded results but I might no…
prozacchiwawa Sep 3, 2024
2bae977
fix alice direction
prozacchiwawa Sep 3, 2024
0cc4642
Merge pull request #17 from aqk/20240830-demo-panic-iii
prozacchiwawa Sep 3, 2024
18ac14f
Fix polarity
prozacchiwawa Sep 3, 2024
7596140
Merge up
prozacchiwawa Sep 3, 2024
9226cfb
Merge pull request #18 from Chia-Network/20240830-demo-panic-iii
prozacchiwawa Sep 3, 2024
5e93fd4
Message handler update
prozacchiwawa Sep 3, 2024
72dda51
fix a few things
aqk Sep 3, 2024
69d36f0
Fix message handler use of state here. We might need to review what …
prozacchiwawa Sep 3, 2024
0a02e71
fmt
prozacchiwawa Sep 3, 2024
e84aad4
clippy
prozacchiwawa Sep 3, 2024
f5e86d5
Merge remote-tracking branch 'upstream/active' into 20240828-demo-pan…
prozacchiwawa Sep 4, 2024
d2db757
Deduplicate
prozacchiwawa Sep 4, 2024
845f4c2
Merge up
prozacchiwawa Sep 4, 2024
fcaa31e
Working well
prozacchiwawa Sep 4, 2024
130aa13
merge fix
prozacchiwawa Sep 4, 2024
ab41868
fmt
prozacchiwawa Sep 4, 2024
0f81421
More movement in the frontend
prozacchiwawa Sep 5, 2024
396b621
more cleaning and refactoring
prozacchiwawa Sep 5, 2024
79038c4
A bit more moving around
prozacchiwawa Sep 5, 2024
572485a
Clippy
prozacchiwawa Sep 5, 2024
99ba469
Should work mostly
prozacchiwawa Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
swizzle which fields are passed on so they line up in our win determi…
…nation
prozacchiwawa committed Aug 29, 2024
commit 9229e7263c00fb8ffafbca42d86877515849672d
11 changes: 7 additions & 4 deletions src/games/calpoker.rs
Original file line number Diff line number Diff line change
@@ -221,8 +221,11 @@ pub fn decode_calpoker_readable(
return Err(Error::StrErr("not all bitmasks converted".to_string()));
}

let bob_hand_value = decode_hand_result(allocator, as_list[3])?;
let alice_hand_value = decode_hand_result(allocator, as_list[4])?;
let start_index = 1;
let offset_for_player = !am_alice as usize;

let bob_hand_value = decode_hand_result(allocator, as_list[start_index + (2 ^ offset_for_player)])?;
let alice_hand_value = decode_hand_result(allocator, as_list[start_index + (3 ^ offset_for_player)])?;

let (your_share, win_direction) =
if let Some(o) = atom_from_clvm(allocator, as_list[5]).and_then(i64_from_atom) {
@@ -245,8 +248,8 @@ pub fn decode_calpoker_readable(

Ok(CalpokerResult {
raw_alice_selects: bitmasks[0],
raw_bob_picks: bitmasks[1],
raw_alice_picks: bitmasks[2],
raw_bob_picks: bitmasks[start_index + (0 ^ offset_for_player)],
raw_alice_picks: bitmasks[start_index + (1 ^ offset_for_player)],
game_amount: amount.to_u64(),
your_share: your_share.to_u64(),
bob_hand_value,