Package: mnkgame
mnkgame- Library and user interfaces for (m,n,k)+g?-games.OverviewThis software provides a library and user interfaces for(m,n,k)-games, including optionalgravityand simple search-tree algorithms.The(m,n,k)-gamefamily of games are played in a rectangular grid of sizem x n(wheremis the number of rows andnis the number of columns).
Each player position a piece (typicallyXandO) on the grid in alternating turns until one of the player manages to alignkpieces either horizontally, vertically or diagonally.
The first player to achieve this wins the game.A variant of this game, calledgravity, is when the pieces cannot be put anywhere in the grid but mustfalltoward the lower horizontal edge of the grid, so that each piece must be placed either at such edge or on top of another piece.Popular such games are:(m=3, n=3, k=3):tic-tac-toe(m=15, n=15, k=5):gomoku(m=6, n=7, k=4, gravity):connect4The following user interfaces are provided:a Command-Line Interface (CLI) - with optional coloring fromblessed/blessings.a Text User Interface (TUI) - planned to be implemented withasciimatics.a Graphical User Interface (GUI) - implemented withtkinter.For a more comprehensive list of changes seeCHANGELOG.rst(automatically
generated from the version control system).Quick StartOnce installed on a properly set-up system, running the software is as simple as typing:$mnk-gamewhich will default to the best user interface (UI) the system can handle.To specify a certain UI, just use the first positional argument, e.g. for the CLI:$mnk-gamecliTo get information on the command-line option, just type:$mnk-game--helpwhich produces:usage: mnk-game.py [-h] [--ver] [-v] [-q] [-m N] [-n N] [-k N] [-g] [-a MODE]
                   [-t X] [-c]
                   [USER_INTERFACE]

(m,n,k)-game: command-line interface.

positional arguments:
  USER_INTERFACE        select the user interfact [auto|(auto, gui, tui, cli)]

optional arguments:
  -h, --help            show this help message and exit
  --ver, --version      show program's version number and exit
  -v, --verbose         increase the level of verbosity [1]
  -q, --quiet           override verbosity settings to suppress output [False]
  -m N, --rows N        number of rows for the board [3]
  -n N, --cols N        number of cols for the board [3]
  -k N, --aligned N     number of aligned pieces required for winning [3]
  -g, --gravity         use gravitataion-rule variant [False]
  -a MODE, --ai_mode MODE
                        AI mode [alphabeta_jit|(alphabeta_jit, alphabeta,
                        negamax, pvs, alphabeta_hashing, random)]
  -t X, --ai_time_limit X
                        time limit for AI move in sec [4.0]
  -c, --computer_plays  computer plays first move of first game [False]

v.0.0.0.4 - Riccardo Metere <rick@metere.it>
License: GNU General Public License version 3 (GPLv3)InstallationThe recommended way of installing the software is throughPyPI:$pipinstallmnkgameAlternatively, you can clone the source repository fromGitHub:$gitclonegit@github.com:norok2/mnkgame.git$cdmnkgame$pipinstall-e.LicenseThis work is licensed through the terms and conditions of theGPLv3+.
See the accompanyingLICENSE.rstfor more details.AcknowledgementsThis software is a spin-off of a Python course held in 2018 at theDonders Institute, part of theRadboud University Nijmegen(neither of which is involved or in any way affiliated with this).