Giter Site home page Giter Site logo

blackjacksimplesimulator's Introduction

BlackJackSimpleSimulator

It is my hope that this project demonstrates a reasonable proficiency with Java.

I created this project simply to refresh my memory on the Java language. I have a lot of experience with Microsoft C#. Where I could, I attempted to carry architectural and "patterns and practices" that I am familiar with into this Java program. These include: the use of interfaces, abstract classes, and Inversion of Control (IoC) (though I would really like to have implemented Dependency Injection (DI)). Where appropriate, I used unmodifiable lists, which are Java's equivalent to the .Net immutable collections.

The basic approach of this project demonstration is that my fictitions company wants to create an online casino. This casino will eventually have machines and table games, but will start with only Blackjack. Plus, that initial Blackjack game will be a basic game, without any of the more advanced Blackjack concepts. Those advanced concepts would be added by adding a new Blackjack game design, which would likely use the initial Blackjack game as a foundation.

To support this "casino" idea, the concept of a Participant has been separated from all games. This allows for future growth, where a Participant exists outside of games. Such growth would include traits that would allow them to have an account, a biography, and a photo. Since casinos are interested in tracking what their attendees do, an abstracted Participant would allow the casino to have historical information about that Participant, no matter what gaming activities the Participant participated in.

To continue the "casino" idea:

  • Card games would introduce a common concept of a Table, which is capable of managing the card deck for any type of card game.
    • The Table must manage the card deck, including shuffling
    • For card management, the Dealer initiates most actions
    • The Table must support a discard pile, incase several rounds occur in between shuffling
  • Card games would introduce a common concept of a Seat, which is responsible for managing a Participant's card hand
    • Participants actually don't directly interact with their card hand.
    • most card games support visible and hidden cards, so the seat's card management differenciates them.
  • Dealers and Players are very similar, so they are based on a Participant class
  • Dealer Card management:
    • Get card from Table and provide it to a Particiant Seat
    • Retrieve all cards from a Participant Seat and provide to the Table discard pile

blackjacksimplesimulator's People

Contributors

csdarnell avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.