Git Product home page Git Product logo

truco's Introduction

Truco RL

Let's create Reinforcement Learning implementations for Truco

Truco Card Game

Truco is a popular card game originated in Argentina and enjoyed in various countries across South America. This project provides a Python implementation of the Truco game, allowing players to enjoy the game in a digital format.

Features

  • Basic gameplay mechanics of Truco
  • Support for two players
  • Interactive command-line interface
  • Truco: Players can call "Truco" to raise the stakes and potentially win more points
  • Retruco and Vale Cuatro: Players can further raise the stakes with "Retruco" and "Vale Cuatro" calls
  • Envido: Players can bet on the strength of their hand based on the sum of the values of two cards of the same suit
  • Flor: Players can bet on having three cards of the same suit
  • Contra Flor al Resto: Players can counter the Flor bet with a higher Flor
  • Passing turns: Players can choose to pass their turn
  • Mazo: If both players pass consecutively, a card is drawn from the deck to determine the winner of the round
  • Resign: Players can resign the game, declaring the opponent as the winner
  • Replay: Players have the option to play another game after the current one ends
  • Separate scoring system for Truco, Envido, and Flor

Getting Started

Prerequisites

  • Python 3.x

Installation

  1. Clone the repository:

git clone https://github.com/your-username/truco.git

  1. Navigate to the project directory:

cd truco

Files

  • main.py: The main game loop and user interaction.
  • game.py: Contains the Game class and game-related constants.
  • player.py: Contains the Player class.
  • deck.py: Contains the Deck class.
  • card.py: Contains the Card class.
  • truco_min.py: A simplified version of the Truco game with basic gameplay mechanics in a single file.
  • truco_med.py: A medium-complexity version of the Truco game with additional features in a single file.

Usage

To start a game of Truco, run the following command:

python main.py

Follow the on-screen prompts to enter the names of the players, choose the game settings, and play the game. The game will continue until one player reaches the winning score or chooses to stop playing.

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request. Make sure to follow the existing code style and conventions.

License

This project is licensed under the CC.

Acknowledgements

  • The Truco card game rules and mechanics are based on the traditional Argentinian version of the game.
  • Special thanks to the contributors who have helped improve this project.

Contact

For any questions or inquiries, find us @ https://discord.gg/spatiotemporalmesh

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.