Skip to main content

An easy way to simulate and automize go-like programs.

Project description

An easy way to simulate and automize go-like programs.

Installing

To install the library from PyPi, you can just run the following command:

# Linux/macOS
python3 -m pip install -U gogame

# Windows
py -3 -m pip install -U gogame

To install from the development sources, do the following:

$ git clone https://github.com/BlackRaven0405/gogame
$ cd gogame
$ python3 -m pip install -U .

Quick Example

import gogame


class RandomPlayer(gogame.Player):
    def play(self):
        return self.playable_moves()[0]


b = gogame.Board()
p1 = RandomPlayer(name="John")
p2 = RandomPlayer(name="Smith")
b.join(p1)
b.join(p2)
winner = b.run_game()
print(winner)

You can find more examples in the example directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gogame-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file gogame-1.0.0.tar.gz.

File metadata

  • Download URL: gogame-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.5

File hashes

Hashes for gogame-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1c463782b10a6aa76f6123b6f3a3852b2a2c9c7e1eea5d360822f168709ca9df
MD5 30992754174842804bd26144b391defd
BLAKE2b-256 f1ec7659ec7cb550f5b40d02abbec415b5ea020cea78e812d8f48f19e4b53153

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page