Inspiration
We were inspired by the Deck of Cards API and thought it would be fun to code a game that we played together before.
What it does
The application will run Jie Long, a Chinese card game where you try to place down all your cards and "burn" as few cards as possible. Here is a link to a video explaining the rules: link
How we built it
We used VS Code to liveshare to each other and code together while using the API to store the card information. The main page was made with html and all controls and actions were coded with javascript.
Challenges we ran into
We initially were trying to use Github to code together but found that we had trouble with merging our code together and so we switched to live share and it made it a lot easier. The main challenge was running into issues with the slowness of the API. One of the shortcomings of relying too heavily on an API is that fetching the API too many times is slow and it may randomly not work. This was frustrating as our game worked perfectly fine on its own, but the API caused some issues that we cannot account for.
Accomplishments that we're proud of
We are proud that we were able to integrate the API into our card game since it was the main goal of our project to utilize an interesting and fun API.
What we learned
We learned how to use the API and how to integrate Javascript into HTML. A big part of using the API was learning to read documentation, and what a good documentation of code should look like. Learning how to use fetch commands and async functions in Javascript was a big learning curve but online tutorials exist.
What's next for Let's Play Jie Long!
In the future we may look towards making the game playable across multiple devices at the same time since right now it can only be played on a single device. In its current state, cool features to add would be to *rotate cards so that the current player's cards are always on the bottom. * It would also be cool to make it so that players can customize the designs on the backs of cards.
Built With
- deckofcardsapi
- html
- javascript