Skip to content

brandoncardoso/mnk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNK Game

A connect K-in-a-row game on a M*N grid.

Setup

With pip.

$ pip install git+https://github.com:BrandonCardoso/mnk_game.git

Without pip.

$ git clone https://github.com/BrandonCardoso/mnk_game.git
$ cd mnk_game
$ python setup.py install

How to use

Here's an example of setting up a Tic-Tac-Toe game between 2 random players.

from mnk_game import MNK_Game, RandomPlayer

p1 = RandomPlayer()
p2 = RandomPlayer()
game = MNK_Game(grid_width=3, grid_height=3, win_chain_length=3, p1, p2)
game.play(draw_grid=True)

Releases

No releases published

Packages

No packages published

Languages