Giter Club home page Giter Club logo

yahtzee's Introduction

Welcome to PyYahtzee

PyYahtzee By kwoolter ๐Ÿ’ ยฉ๏ธ 2017

Requirements

What's New

  • Added pygame GUI as an alternative to CLI
  • Run gui_controller.py to launch GUI version

Getting Started

  • Written in Python 3.
  • Run run.py to start the game.
  • Type "help" to find out about the commands to play the game e.g. "help", "help scores", etc.
  • 1 to 4 players can play the game.
  • The rules of Yahtzee can be found here
  • Colours work if the game is run inside PyCharm IDE.
  • A high score table is saved as "PyYahtzee.hst".

Structure

Text Version

The game is structured using the Model-View-Controller paradigm:-

  • Model - the game.py file is the "model" module holds the core of the game e.g. Player, Game, Turn.
  • View - the game_text_view.py file is the "view" module holds the classes that display various aspects of the game e.g.the scorecard, the dice
  • Controller - the controller.py file has the CLI to play the game using the cmd module
  • The utils module has various utilities that are used by the game e.g. HighScoreTable, is_numeric(), pick(), confirm()

Graphics Version

The game is structured using the Model-View-Controller paradigm:-

  • Model - the same game.py as the text version
  • View - the graphics.py file is the "view" module holds the classes that display various aspects of the game e.g.the scorecard, the turn, etc.
  • Controller - the gui_controller.py file has the GUI controller main loop.

Screen Shots

Graphics Version
game1 game2
Text Version
game3 game4

yahtzee's People

Contributors

kwoolter avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

treb-s bosstoa25

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.