Giter VIP home page Giter VIP logo

jeopyrdy's Introduction

jeopyrdy

Pronounced like "Jeopardy".

Run a simple Jeopardy game in python. For now, this is not a package and is intended to be cloned locally to play.

Rules of Jeopardy that are not implemented:

  • Daily double.
  • No final Jeopardy.
  • Others?

Install Dependencies

The code in this repository relies on a few non-standard library packages. They can be installed from a terminal that is within this cloned directory with:

python -m pip install -r requirements.txt

Question CSV file

First you can create a csv file containing your game's questions that looks like this:

Category,Question,Answer
Category 1,This.,What is this?
Category 1,That.,What is that?
Category 2,Foo.,What is bar?

This file should be saved at the top level of the cloned directory (next to this README).

Game Script

Then in a python script you can create your board from this csv, a list of players, and a game:

# imports
from jeopardy import Player, Board, Game

# create jeopardy objects
board = Board.from_file("path-to-above.csv")
players = [Player("Player 1"), Player("Player 2")]
game = Game(topic="My Game's Topic", board=board, players=players)

# start the game
game.start()

Save this python code as a .py file. This file should be saved at the top level of the cloned directory (next to this README).

Run Game Script

Then, from a terminal that is within this cloned directory, and from a python environment with the dependencies installed, the game can be played with:

python path-to-your-game.py

Sound Effects

As the host running python, it can be fun to have this sound board open to provide your players with sounds.

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.