Skip to content

Latest commit

 

History

History
241 lines (179 loc) · 6.71 KB

README.md

File metadata and controls

241 lines (179 loc) · 6.71 KB

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

GoFishEngine

A python engine to create and test Go Fish bots
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Development Setup
  4. Contributing
  5. License
  6. Contact

About The Project

screenshot

(back to top)

Built With

  • React
  • Flask
  • attrs

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Installation

  1. Install the package
    pip install git+https://github.com/Klinefelters/GoFishEngine
  2. Set up the engine:
from gofish import Engine
from gofish.examplePlayers import RandPlayer
from logging import INFO  # Echange this with debug to get more info

engine = Engine(
    players=[
        RandPlayer("Random 0"),
        RandPlayer("Random 1"),
        # Add up to 7 players
    ],
    logLevel=INFO)
  1. Render the results:
    • Print the game out to the terminal
     engine.playGame()
    • Serve the game as a webgui at localhost:8000
     engine.serveGame()
    • Evaulate players over any number of runs
     print(engine.evaluatePlayers(runs=1000))
    • Yeild the game as a generator of summaries
     while True:
         try:
             summary = next(engine.yieldGame())
             print(summary.getDict())
             input()
         except StopIteration:
             break

example:

from gofish import Engine
from gofish.examplePlayers import RandPlayer
from logging import INFO  # Echange this with debug to get more info

engine = Engine(
    players=[
        RandPlayer("Random 0"),
        RandPlayer("Random 1"),
        # Add up to 7 players
    ],
    logLevel=INFO)
engine.serveGame()

(back to top)

Development Setup

  1. Clone the repo:
    git clone https://github.com/klinefelters/GoFishEngine
  2. Install the client:
    cd client
    npm i
  3. Now when testing run the following for hotreloads:
    npm run dev

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Klinefelters - klinefelters@etown.edu

Project Link: https://github.com/klinefelters/GoFishEngine

(back to top)