Coder Social home page Coder Social logo

dominoes's Issues

Issue installing

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

Probability Calculation

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

CLI fails on Python 3.7 and dominoes 6.0.0 with "AttributeError: module 'collections' has no attribute 'abc'"

~ ∴ 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'

0 indexing on dominoes

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:

  1. [1|1]
  2. [6|1]

keep the board visible

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]

Playing with Windows

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 :)

AttributeError: 'module' object has no attribute 'abc'

$ ./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'

after first game, first player is asked "left or right" on first bone

Example:

It is now player 0's turn. Press enter to see player 0's hand.
Board:

Player 0's hand:
0) [1|1]

  1. [1|3]
  2. [2|6]
  3. [3|4]
  4. [0|4]
  5. [1|4]
  6. [6|6]
    Choose which domino you would like to play: 6
    Choose what end of the board you would like to play on (l or r):

====
I would suggest simply detecting the empty board and skipping that Q.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.