Card Game

Spring 2020

The questions below are due on Tuesday March 02, 2021; 11:59:00 PM.
 
You are not logged in.

If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.

1) Overview

In this design exercise you are to create a card-game on your labkit. In particular you are to implement Blackjack/Twenty-One since that has some MIT affiliation. The user interface is left open-ended. It can be bare-bones or have graphics. You must use the open "Deck of Cards" API found here: http://deckofcardsapi.com/. The implementation can be single-player or multi-player (you'll need to at least play against the House/casino). The project can have a server-side element to it or not. Because the Deck-of-Cards API has the ability to remember particular decks of cards in use,

The game must have some sort of betting mechanic and the game must be repeatedly playable. By this we mean that you should not have to restart or reboot your ESP32 to play a new game regularly. High scores stored in some form of persistent storage, such as a database, is desirable but NOT required (databases are covered in week 4). To remove any confusion, you should list the cards that have been dealt/in play (this doesn't mean that you need to render a beautiful Ace or something, but you should be noting unambiguously what each card is.)

When you are done, upload a video showing your stuff working! You should clearly narrate your video and/or add comments so staff knows how to test your design. If we can't figure out how to work with it, we will not grade it.

You may implement an intermediate API on the 608dev-2.net server which your device acceses or the ESP32 may access the above resources directly. The choice is up to you, but please discuss your decision in your report. Your report should list where those resources are located on the server.

External C libraries must be kept to a minimum. You can use C standard libraries as well as code we've been using in 6.08 labs. You should check before using other libraries. You cannot use the Arduino String class.

To upload your code, place all of your ESP32 code into a single functioning containing folder. Place that folder in the same folder as any Python/server code you might have. Then zip and upload the containing project folder. A hierarchy looks like the following:

  • Project Folder:

    • ESP32 Code:
      • main_file.ino
      • any_supporting_files.ino
    • Python Code (if you have code, and even if they live on the server):
      • File 1
      • File 2
  • You must submit a Design Exercise Write-up. Use (the template file provided here). Read this file since it has some instructions about what to include.

  • You must upload all of your code that you used in your design. Failure to upload code will result in significant point loss. This includes if you just forgot. Screenshots of your file's last modified date in My Computer are not evidence that the file has not been changed. They must be uploaded.

  • You must also upload your video to YouTube or any other site that has a timestamp associated with it and is accessible by the staff. Do not upload it to a private video sharing thing where the staff can't see it. Youtube, Google Drive, TikTok (shudder) will all work. Just test the link. Enter the link in the third box below.

Submit your writeup here: No file selected

Submit all of your code here as a zip file: No file selected

Enter the url for the video

Problem Status:
A Python Error Occurred:

Error on line 3 of Python tag (line 105 of source):
    kerberos = cs_user_info['username']

KeyError: 'username'

This problem will not be marked as done until graded by the staff. If you have filled it out, it will appear as with a note saying "Work Submitted" on the main ex03 page.
Back to Exercise 03