abw333 / dominoes Goto Github PK
View Code? Open in Web Editor NEWA Python library for the game of dominoes, with an accompanying CLI and AI players.
License: MIT License
A Python library for the game of dominoes, with an accompanying CLI and AI players.
License: MIT License
When running pip install dominoes
I get this message:
Could not find a version that satisfies the requirement dominoes (from versions: )
No matching distribution found for dominoes
I am stuck, I want to calculate probabilities of the tiles before shuffling, after shuffling and whenever a new move is made. I am using Bayes' theorem, i have written my code for it, but now i am stuck where to make changings to monitor probabilities after every move including pass.
I need very serious help please.
Ahmad
~ ∴ python --version
Python 3.7.0
~ ∴ pip list
Package Version
---------- -------
dominoes 6.0.0
pip 18.1
setuptools 40.4.3
wheel 0.32.2
~ ∴ dominoes
Traceback (most recent call last):
File "/Users/abw333/.virtualenvwrapper/dominoes37/bin/dominoes", line 3, in <module>
import dominoes
File "/Users/abw333/.virtualenvwrapper/dominoes37/lib/python3.7/site-packages/dominoes/__init__.py", line 13, in <module>
from dominoes.hand import Hand
File "/Users/abw333/.virtualenvwrapper/dominoes37/lib/python3.7/site-packages/dominoes/hand.py", line 18, in <module>
class Hand(collections.abc.Sequence):
File "/Users/abw333/.virtualenvwrapper/dominoes37/lib/python3.7/collections/__init__.py", line 55, in __getattr__
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
AttributeError: module 'collections' has no attribute 'abc'
it might be confusing to use 0-index on dominoes: Player nums are ok, but when displaying the dominoes it might be better to start w/ 1 (that way you can tell how many bones you have left by looking at the last one:
I would consider always showing the board in the client (so in the "press enter to start Player X turn" screen, you'd still see the layout).
It is now player 0's turn. Press enter to see player 0's hand.
Board:
[1|1][1|6][6|6][6|0]
I noticed that I could only run this game in Linux. Is there a way that I could play on Windows? Reasons? BTW, nice game and thank you :)
$ ./bin/dominoes
Traceback (most recent call last):
File "./bin/dominoes", line 3, in
import dominoes
File "/home/sven/Local/lib/python3.4/site-packages/dominoes/init.py", line 13, in
from dominoes.hand import Hand
File "/home/sven/Local/lib/python3.4/site-packages/dominoes/hand.py", line 18, in
class Hand(collections.abc.Sequence):
AttributeError: 'module' object has no attribute 'abc'
Example:
It is now player 0's turn. Press enter to see player 0's hand.
Board:
Player 0's hand:
0) [1|1]
====
I would suggest simply detecting the empty board and skipping that Q.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.