DEV Community

Andrew Darfoor
Andrew Darfoor

Posted on

Need Help with Web Programming Project

this a good place to ask for help with web programming? I am in desperate need of assistance. I have a project due where I need to create a Blackjack game with the following functionality:

a) "Splitting" capability: What is splitting? If you hold two cards with the same value, like two eights or two sixes, you can split them into separate hands and play each hand individually. For this project, once the two cards are split, they should be treated as two separate hands, each with its own "hit," "stay," and "split" (if the two cards are the same) buttons. To achieve this, I need to add a button that appears only when the player holds two identical cards, and otherwise stays hidden. Once the button is clicked, the two cards should be split into two hands.

b) "Reset" capability: Currently, the game can only be reset by refreshing the page. I need to create a button that resets the game environment and starts a new game by clearing the scores and cards, without refreshing the page.

c) Disable "hit" button: When the player's total exceeds 21, the "hit" button should be disabled and grayed out to prevent further action, until the game is reset or a new game begins.

I’ve managed to get b) and c) working, but no matter what I try, I haven’t been able to get splitting to work. Additionally, I need to add a backlog feature that tracks matches, pauses, and records the player's progress, so users can return to their previous place in the game.

I’ve tried everything and I'm at my wit's end. I’ve talked to my professor, but he can only help during office hours and doesn’t respond to emails frequently. I’ve asked a friend, but they don’t know much about web programming. I’ve also talked to a cousin, and since my class doesn’t have a TA, I can’t ask them. I’ve searched YouTube and asked ChatGPT for help, but nothing has worked so far, and I’m running out of time. I need to finish this by Wednesday. I’m not sure what else to do.

Top comments (0)