Posts

Table of Contents

  1. Home…………………………………………………Table of Contents & Executive Summary
  2. Business Plan……………………………………..Digital Advertisement, Promotional Video & User      Interviews
  3. Conclusion & Recommendations………………………………….Conclusions on the Project
  4. Discussion……………………………………………..Brief Discussion of the construction of the project
  5. Final Algorithm………………………………………Algorithm of Blackjack
  6. Final Program………………………………………..The code used in MATLAB with comments
  7. Project Management Documentation……………………………..Indiv. Responsibility Agreement, Meeting Notes, Project Schedule, Team Working Agreement
  8. Software Documentation…………………………Program Description for Developers & User Manual

Executive Summary

Team D – Jack Sorce, Parker McClure, Jacob Spurgeon-Hess

Engr 1181 – Jessica Thomas, Miranda McGruthers

Background and Purpose

The purpose of this project was to use MatLab to develop a playable version of the classic game blackjack. Along with the development of the code, the team was tasked with documenting all the steps that led to the final product. This project not only provided practice in the specific field of computer science, but a broader insight into how projects are managed, the functionality of teamwork, and the need of proper documentation in every step of development. The assignment also challenged the team to think critically in the fact that it requires taking a commonly known game (blackjack) and figuring out how to translate it into the language of MatLab.

Results and Analysis

The first thing done by the team on day one of work, was to create a working flowchart and algorithm of blackjack in order to concretely grasp what goes into each round. This also required a small amount of research into certain variations in the rules of blackjack, and forced a team discussion into what variations would be included in our version. Such discussions and our final decisions (in parenthesis) are: does the dealer have a hard cap at 17 or can he hit on 17 if he has two cards (hard-cap at 17); how many decks should be used as the more decks used the greater the advantage of the house (only use one-deck); splitting and doubling down are complex strategies that some casinos allow which gives the player more chances to earn a higher payout (we decided against these variations to keep the game simple and easy); should the payout for a blackjack be normal, x1.5, or x2 (we decided to give the normal payout even for a blackjack); and lastly, does the dealer win a tie or does the player get his money back on a tie (we decided to have the player get his money back).

After deciding the specific rule variations used in this version, the next step was to figure out how to put our algorithm into matlab code. The first hurdle was how to program a deck of 52 cards, a seemingly daunting task. However, we realized that we could have matlab select a random integer from 1-13, and assign those to character arrays of “ace,” “two,” “three,”… up to “king,” and then assign each of these arrays with their values of 1-10. The next step was to create a banking system that would allow the user to manage his/her money supply. The team decided that the game ought to prompt the user how much money he/she wanted to bring to the table each round. Initially, we programmed the game to start the user with a certain amount of money and keep track of the balance until the user quit. However, in order to bring the game into market, we decided that it would be best for the user to put a certain amount of money into the game and walk away with however much he wanted at any point. Lastly, the team had to program a way for the user to make decisions in the game, which was done simply by asking them to input 1 to hit or 2 to stand. At the very beginning of the code, the user is asked if they would like to play: 1 for yes, zero for no. That input value is stored as a variable, and the entire code is nested inside a while loop that runs so long as that variable is true. At the end of the round, the player is asked the same question: 1 to continue playing and zero to walk away. The game loop will continue running so long as the user continues to input 1.

Conclusions and Recommendations

The software design project was an overall good experience, despite no shortage of challenges along the way. The final blackjack is very fun, and perfectly simulates the game as if you were in the casino. The process of getting to the final code helped the team develop a greater sense of what goes on in real-world software design and how to work as a team on a project.