Skip to content

Commit

Permalink
add challenge player
Browse files Browse the repository at this point in the history
  • Loading branch information
dpinones committed Nov 1, 2024
1 parent e6b38b7 commit 9640a84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/models/status/round/challenge.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use jokers_of_neon::constants::{
use jokers_of_neon::{
models::{
data::{
challenge::{Challenge, ChallengeStore, ChallengePlayerStore}, card::{Card, Suit, Value},
challenge::{Challenge, ChallengeStore, ChallengePlayer, ChallengePlayerStore}, card::{Card, Suit, Value},
game_deck::{GameDeckStore, GameDeckImpl},
events::{ChallengeCompleted, PlayGameOverEvent, ModifierCardSuitEvent, SpecialModifierSuitEvent},
poker_hand::PokerHand
Expand Down Expand Up @@ -48,6 +48,9 @@ impl ChallengeImpl of ChallengeTrait {
ChallengeStore::set(@challenge, world);
emit!(world, (challenge));

let challenge_player = ChallengePlayer { game_id, discards: 5, plays: 5 };
ChallengePlayerStore::set(@challenge_player, world);

let mut game_deck = GameDeckStore::get(world, game_id);
game_deck.restore(world);
CurrentHandCardTrait::create(world, game);
Expand Down

0 comments on commit 9640a84

Please sign in to comment.