Giter VIP home page Giter VIP logo

beat-the-dealer's Introduction

beat-the-dealer

beat-the-dealer is a command line application (cli) for playing a game of blackjack against a dealer.

This program is developed as part of a technical assignment given for a job interview.

Prerequisites

java 1.8 or above

Installation

Clone the project

git clone https://github.com/mohamead/beat-the-dealer.git

Build the executable jar (fatjar) using the gradlew wrapper

./gradlew clean task fatjar

Locate the jar

cd build/libs/
ls
beat-the-dealer-0.0.1.jar

Usage

See available options with --help option

$ java -jar beat-the-dealer-0.0.1.jar --help
 __ ___  __ _____  _____ _  _ ___   __  ___  __  _   ___ ___                   
|  \ __|/  \_   _||_   _| || | __|_| _\| __|/  \| | | __| _ \                  
| -< _|| /\ || ||__|| | | >< | _|__| v | _|| /\ | |_| _|| v /                  
|__/___|_||_||_|    |_| |_||_|___| |__/|___|_||_|___|___|_|_\                  
                                                                               
Usage: beat-the-dealer [-h] [-f=<file>]                                        
Command line application (cli) for playing a game of blackjack against a dealer
                                                                               
Options:                                                                       
  -h, --help          output usage information                                 
  -f, --file=<file>   file with the deck of cards                          
                                                                               
Developed by Mohamed Adrik    

Run the program

$ java -jar beat-the-dealer-0.0.1.jar 
dealer
sam: C5, H4, DJ
dealer: HA, S5, D2, S2

Run the program with --file option

$ java -jar beat-the-dealer-0.0.1.jar --file ../../src/test/resources/validCards.csv 
sam
sam: CA, H9       
dealer: D5, HQ, S8

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

apache-2.0

beat-the-dealer's People

Watchers

Mohamed Adrik 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.