Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple game of Nim written in Python

License

NotificationsYou must be signed in to change notification settings

Tosox/Simple-Nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple game of Nim written in Python

Important Note: The AI isn't implemented yet and is instead using the logic of a random player

Usage

# Example> python ./simple_nim.py -p1 Human -p2 Computer --rand 1

Alternatively, simply execute'play.bat'

ArgumentsDescriptionAccepted inputNotes
-p1Player type for player 1Human, Computer, Random, AI
-p2Player type for player 2Human, Computer, Random, AI
--randStarting player0 (Random), 1 (Player 1), 2 (Player 2)Optional - Defaults to 0

Rules

Two players will each take one, two or three coins at a time from a heap containing 21 coins.The player who has no coins to retrieve from the heap loses.

Preview

More Information

About

A simple game of Nim written in Python

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp