Code Monkey home page Code Monkey logo

texas-holdem's Introduction

Texas Hold'em Poker

logo

App allows to play online in texas holdem poker with other players.
Project maked with: python, django, html, bootstrap, js, sql, redis, django_channels.
Mobile friendly. Responsive.

Game description

Max 4 players can play at the table. Players are automatically allocated to the tables. Game is running if minimum 2 players sit on the table. You don't want to register? No problem, 'Play as a guest'.

How to run in local host

pip install -r requirements.txt
python manage.py migrate
docker run -p 6379:6379 -d redis:2.8
python manage.py runserver

How to play

The game follows the Texas Holdem Poker rules. The only thing you have to do is click 'play'. You can play as a registered user or as a guest. If you want to 'play as a guest' (at least one player must be registered in db).

texas-holdem's People

Contributors

koualsky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

alonazrael

texas-holdem's Issues

Raise/call/check and pass - make only 2 button's to decision

  • Display 'check' button if every player give the same value of money to pool
    (or - simplest way - if in input field is 0 (set min value to 0)
  • Display 'call' if in input field is == (biggest_rate() - player.round_money)
  • Display 'raise' if in input field is > (biggest_rate() - player.round_money)

'Play again' bug

If you are a player who make the last decision in game, you don't see 'play again' button instantly, because you have yet 'check' state instead 'start' state.

After reload, everything is fine.

Raise problem

Game should go to the next game path only, when every player give to the table the same value of money.

But, that not works.

Mixed Content for websocket

Chrome devtool error message:
Mixed Content: The page at 'https://DOMAIN/table/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://DOMAIN/ws/chat/1/'. This request has been blocked; this endpoint must be available over WSS.
Code Related:

var chatSocket = new WebSocket(
'ws://' + window.location.host +
'/ws/chat/' + room_pk + '/'); /*********************************/

Being a mixed content issue, it only triggers when the page is loaded through https

'Big blind' or 'joining' problem

Game start after second player is joining to the game, because first and second player have 'start' state

If in this moment to the game join third player, they have 'out' state.

Big_blind is take from third player if he have 'start' state.

Fix this problem

Hidden 'dealer' field in Table model

From unidentified reason, 'dealer' field disappear from Table model.
But only after call (try it again) table.dealer()

Try turn off that function and try again. Field disappeard now?

Winner page

Make 'winner' page

  • shows winner player
  • next game direct to new game

Pass problem

The same problem as with the 'big blind'.

If player have 'pass' state - player still can make decisions.

If player have 'out' state - game crash.

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.