Skip to main content

A toolsuite for win at Marienbad (Nim) game.

Project description

Marienbad

A simple toolsuite for help you to win at Marienbad game, a Nim game.

It is recommended to use the PyPy interpreter instead of the CPython standart.

Generator

Pour utiliser cet outil, entrez la commande :

marienbad-generator

Pour voir toutes les options disponibles :

marienbad-generator --help

Vous pouvez aussi le démarrer depuis un script python :

import marienbad
marienbad.generator.main()

Bien sûr, vous pourvez ré-utiliser certaines fonctions :

from marienbad.generator import checkCombination
checkCombination([1,3,5,7]) # True
checkCombination([1,3,6,7]) # False

La fonction generateTable imprime le résultat sur la sortie standart. Pour récupérer cette sortie, utilisez le script suivant :

import sys
from io import StringIO

# rediriger stdout dans un buffer :
sys.stdout = StringIO()

# appel de la fonction qui remplira stdout (donc le buffer)
generateTable(10,10)

# récupérer le contenu du buffer :
s = sys.stdout.getvalue()

# fermer le buffer :
sys.stdout.close()

# rediriger stdout vers la sortie standart :
sys.stdout = sys.__stdout__

# le résultat est maintenant dans la variable s

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

marienbad-0.1.2.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

marienbad-0.1.2.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file marienbad-0.1.2.1.tar.gz.

File metadata

  • Download URL: marienbad-0.1.2.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for marienbad-0.1.2.1.tar.gz
Algorithm Hash digest
SHA256 6be8951182d21ba60656a4570e160b20fdfea981e9e5ec2b85c829c1802439dd
MD5 8d3f4ee395dc1ee936cfb9e7c436522e
BLAKE2b-256 38bd2e35aad412f3936f88724ac83ea00ab1893f6362b34a9332a2da1cc67d2a

See more details on using hashes here.

File details

Details for the file marienbad-0.1.2.1-py3-none-any.whl.

File metadata

  • Download URL: marienbad-0.1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for marienbad-0.1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1be72b82fec65699147517e80122a7b096a8d85d1fcc4b4a05109631fae7479f
MD5 4c1680edb81ae83750f6ef171a492841
BLAKE2b-256 40553b79791215e6066452b2483d03b7a64f52600f6a19230faad657fd2bfe89

See more details on using hashes here.

Supported by

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