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

FE: Implement draw and drawForJoin #6

Closed
sashak0 opened this issue Mar 22, 2023 · 0 comments · Fixed by #54
Closed

FE: Implement draw and drawForJoin #6

sashak0 opened this issue Mar 22, 2023 · 0 comments · Fixed by #54
Assignees

Comments

@sashak0
Copy link
Collaborator

sashak0 commented Mar 22, 2023

Draw 5 random cards when joinGame
from the player's deck -> hand

  1. getDeck - once at the start of the game
  2. getRandomness - to do @norswap
  3. draw deck[rand] % deck.size
  4. update the deck - copy and pop, order will change
function drawForJoin(initialRandomness) {
    randomness = initialRandomness;
    for (i = 1 to 5) {
        draw(randomness);
        randomness = sha256(randomness);
    }
}

function draw(randomness) {
    // todo
}
@sashak0 sashak0 self-assigned this Mar 22, 2023
@sashak0 sashak0 changed the title FE: Implement drawForJoin FE: Implement draw and drawForJoin Mar 22, 2023
@norswap norswap assigned norswap and unassigned sashak0 May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants