Giter Site home page Giter Site logo

blackjack's People

Contributors

ksouthwood avatar

Watchers

 avatar  avatar

blackjack's Issues

Change players from an array to a linked list

Change how we access the players from an array style (using malloc to allocate memory) to a linked list which will make it easier to allow a player to quit (or remove them when they run out of money). Means lots of changes wherever we access the player.

Implement resizing of card array

In case a hand goes past 7 cards (should be very rare, but possible), write code to increase the size of the array to 10 cards (probably handled in deal_card()), then dropped back down to 7 after the hand (probably in clear_hands()).

This is the unfinished part of issue #4.

Convert build system from Make to CMake

Update the build system from using hand built makefiles to using CMake. CMake works better with CLion and overall should be easier to maintain moving forward.

Implement insurance bets

Insurance bets in the case of the dealer showing an Ace is not implemented. Need to update player struct to include field for this bet. Probably will wait until the player handling has been updated from an array to a linked list.

Implement split cards functionality

Implement function to split cards. Will have to check if player has only two cards and are of same value (10, J, Q and K all count as same). Update pointers as necessary, then deal new card to each hand.

Change cards from linked list to array

Change how we store the cards in the hands. Use an array of structs instead of a linked list, using default size of 5. This will ease handling/checking the cards in various functions. On the few occasions where we need more than 5 cards we'll just double the array size temporarily and reset it after the hand is over.

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.