Git Product home page Git Product logo

rummy's People

Contributors

damr- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rummy's Issues

Work on Set,Run and Duo detection

Figure out when finding sets/runs/duos which use some of the same cards is needed and when the found card packs should be unique.

**Example **
Having J♦Q♦Q♦ detects two duos J♦Q♦, each with a different Q♦.
Keeping both Q♦ on hand is unnecessary though, as long as they cannot be used elsewhere.

Improve run detection

Add functionality to detect runs of any length including joker cards, but the latter may only start/end a run if its length is 3.

Then the separate detection of joker-card finished duo-runs can be removed.

Improve singles logic

Currently, cards which are laid down alone ("singles") are put at the first possible card spot.
There are scenarios (concerning runs) where this is not optimal and more thought should be put into this.

Example
The run J♠Q♠K♠ is laid down and there are a black Joker and a 9♠ on hand. Currently, the joker will always be added at the end of the run and the 9♠ cannot be used.

Example 2
The run J♠Q♠K♠ and the set 10♦10♣10♥ are laid down. A 10♠ and a 9♠ are on hand. Currently, there is no mechanism to detect that adding 9♠10♠ to the run is better than just finishing the set with the 10♠.

Possible solutions

  • Check whether attaching a single onto a run will allow another card to be put there too.
  • Check for cards on hand whose rank is highestRank+2 or lowestRank-2 of a run and whether another card can fill that gap (be it a joker or the exact card with the right rank and suit).
    If no card can fill the gap, try to keep the single on hand anyway (unless there are <3 cards on hand)
  • Check if duos can be appended onto a run and prioritize them over singles.

Furthermore, single cards should prioritize card spots where they can replace a joker.

Sometimes player is drawing cards from opponents hand cards , opponents grouped cards and from Deck simultaneously

Player cannot have more than 13 cards, but after few moves player is grabbing some cards from other players cards instead of deck. When player draws cards from other player, it is also simultaneously drawing a card from Deck, as a result one player gets more than 13 cards in his hands and other player gets less than 13 cards in his hand.
Please fix this issue
I am currently converting this ai project into manual project. I haven't changed anything yet but I found out this bug. Please if you have any manual project for rummy please send it to me. It will be big help for me to learn this things.

Thank you in advance!
Waiting for your response...

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.