Giter VIP home page Giter VIP logo

phakphumv / blackjack-sim-th Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 660 KB

This project is to create a blackjack simulation which will be played by different bots to find different winning strategies and factors that support players winning. The whole project lifecycle was lived on my personal youtube channel, collaborated with a developer Praphan.O

HTML 9.47% CSS 5.35% TypeScript 85.19%
blackjack

blackjack-sim-th's People

Contributors

e23thr avatar phakphumv avatar

Watchers

 avatar

Forkers

e23thr

blackjack-sim-th's Issues

Bot 4 - Random

Create a bot that will randomly choose between HIT or STAND equally. (50%/50%)

Rules : Dealer points

If dealer’s point > player points, player lose.

If dealer’s point < player points, player win.

If dealer’s point = player points, draw.

Bot 5 - Hit until 'x' strategy

Create a bot as a player with the following behavior:

Define a 'x' as value limit. x can be between 11-21.
If below or equal 'x', HIT. Else if above or equal 'x', STAND.

Rules : 21 Points

When exceed 21 points, player/dealer busted.

When reach 21 points, end player action

If it’s within 2 cards, player win blackjack.

If dealer draw 21 points with first 2 cards, dealer win blackjack and end round.

Bot 3 - Dealer Copy Cat

Create a bot as a player with the following behavior:

If below or equal 16, HIT. Else if above or equal 17, STAND.

(This behavior is same as dealer action rules)

Create Card deck

A,2-10, J,Q,K
each with 4 suits : spade, diamond, heart, club

Player Action : HIT

When it's a player's turn, the player can choose either HIT or STAND.

When HIT, a new card will be drawn into a player hand.
The total value will be calculated via #7

If the total value is still below 21, the player still can continue to chose either HIT or STAND.

Player Action : STAND

When it's a player's turn, the player can choose either HIT or STAND.

When STAND, the player's turn end and will continue to the next player.

Dealer action rules

Dealer action must follow this logic.

If below or equal 16, HIT. Else if above or equal 17, STAND.

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.