Code Monkey home page Code Monkey logo

azul's Introduction

Azul board game clone

This is a text-based Python implementation of the fun, popular board game Azul.

If you are not familiar with the game, check out the rules of the game or watch this brief video.

Playing the game

Run the azul.py file. For example

$ python3 azul.py

Instructions

It will prompt you for the number of players (between 2 and 4), and for the number of human players, if any. If you only want to simulate a game with the AIs, enter 0. For each human player it will prompt you for a name.

If only AIs are playing against each other, it will simulate the entire game. It will print out the AI's choices and the intermediate scores after each round. At the end of the game, it will print out the player scores and the winner.

If one or more human players are playing, it will prompt you for your choices on each factory offer turn:

  1. Pick a factory display or the center. Enter your Choice Number as indicated on the screen.
  2. Pick a color from the chosen tiles.
  3. Pick a pattern line to place it on from the allowed lines indicated on the screen. If the tiles can only be placed on one pattern line or on the floor, the game engine will automatically do so.

Known Issues

  1. No exception handling for improperly entered inputs. The game engine will crash if you enter a wrong input which is not consistent with the stated prompt.

Future plans

  1. Add basic exception handling.
  2. Currently the AIs choose randomly. Update the AIs to use some machine learning models.
  3. Create a web or GUI based version of the game.

azul's People

Contributors

mbkamdar avatar

Watchers

 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.