Inspiration

I wanted to create a project that would allow me to use Chainlink's VRF

What it does

My project simulates the game of black jack. There is a player and a dealer. The winner either hits 21, has the higher score, or doesn't hit above 21.

How we built it

I used foundry for the smart contract framework and I implemented Chainlink's VRF and Automation.

Challenges we ran into

  1. Figuring out how to generate 52 cards of a deck with properties of rank, suit, card value.
  2. Then generating 52 random cards.
  3. Getting the frontend to properly display the correct data to match the backend (didn't finish yet). ## Accomplishments that we're proud of
  4. Being able to generate 52 cards in a deck that represented each card in a deck.
  5. Being able to implement the functionalities on the smart contract end. ## What we learned
  6. I learned how to use different data structures such as structs, arrays, and mappings to create data by combining them.
  7. I also learned how to use VRF and Automation.
  8. I also learned how to ask better questions so that helps me better understand the problems that I encouter. ## What's next for Blackjack I would like to finish the frontend so that it works properly and then write test scripts for the functions.

Built With

  • foundry
Share this project:

Updates