Coder Social home page Coder Social logo

lafilledepondy / rummy Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 7 KB

Welcome to Mini Rummy! This is a simple console-based implementation of the classic card game Rummy. The game is designed for two players, and the objective is to form sets of cards to win the game.

Python 100.00%
game rummy

rummy's Introduction

Mini Rummy Game

Welcome to Mini Rummy! This is a simple console-based implementation of the classic card game Rummy. The game is designed for two players, and the objective is to form sets of cards to win the game.

Getting Started

Prerequisites

  • Computer obviously ;)
  • Python

Installation

  1. Clone the repository:

    git clone https://github.com/lafilledepondy/rummy.git
  2. Navigate to the project directory:

    cd rummy
  3. Run the game:

    py main.py

How to Play

  1. Each player is dealt a hand of 10 cards from a standard deck.
  2. Players take turns drawing cards, either from the deck or the pile.
  3. The goal is to form three sets of cards:
    • Two sets with three cards each
    • One set with four cards
  4. A set can be either a "book" (cards of the same rank but different suits) or a "run" (a sequence of cards in the same suit).
  5. After drawing a card, players must discard a card onto the pile.
  6. The game continues until one player successfully forms all the required sets.

Rules

  • A player must have at least one valid "book" and one valid "run" to win.
  • A "book" consists of cards of the same rank but different suits.
  • A "run" is a sequence of cards in the same suit.
  • During each turn, a player can choose a card from the pile or the deck to create sets.
  • After selecting a card, the player must discard a card onto the pile.

Actions

  • Move Cards (M): Rearrange cards in your hand.
  • Pick from Pile (P): Pick a card from the pile.
  • Take from Deck (T): Draw a card from the deck.
  • Drop (D): Discard a card onto the pile.
  • Sort (S): Sort your hand in descending.
  • Close Game (C): Attempt to close the game (win).

Exiting the Game

  • To exit the game, enter 'X' during your turn.
  • Confirm your exit choice with 'Y' or 'N'.

Author

  • Gayathiri RAVENDIRANE aka lafilledepondy

Acknowledgments

rummy's People

Contributors

lafilledepondy 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.