GithubHelp home page GithubHelp logo

hippich / bitcoin-poker-room Goto Github PK

View Code? Open in Web Editor NEW
131.0 26.0 90.0 11.51 MB

Sources for Bitcoin Poker Room.

Home Page: http://betco.in

License: Other

Perl 4.66% Python 60.47% PHP 0.89% Shell 0.06% CSS 2.07% JavaScript 31.80% Prolog 0.05%

bitcoin-poker-room's Introduction

Install under Ubuntu 11.10

Install Python Poker Network

Project depends on python-poker-network project. Since this is ugly "glue it together" type of project, we will install python-poker-network from repositories and then link certain files to our project files.

First of all make sure MySQL server installed first:

sudo apt-get install mysql-server

Start by installing python-poker-network:

sudo apt-get install python-poker-network

Install bitcoind from David Armstrong repository:

sudo add-apt-repository ppa:stretch/bitcoin
sudo apt-get update
sudo apt-get install bitcoin

Our implementation of python-poker-network software uses /dev/random. Check it if it produce a lot of data by default (cat /dev/random) - you need 1-5 Kb/s minumum. If this do not happen you need to install rng-tools:

sudo apt-get install rng-tools

And configure it to use initial data from /dev/urandom. To do this edit file /etc/default/rng-tools and insert following line at the end of the file:

HRNGDEVICE=/dev/urandom 

Restart rng-tools by:

sudo /etc/init.d/rng-tools restart

Install Apache web server:

sudo apt-get install apache2

Create new virtual host config file:

sudo vim /etc/apache2/sites-available/room.conf 

With similar configuration:

<VirtualHost *:80>
  ServerName room

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyPass /POKER_REST http://localhost:19384/POKER_REST retry=1
  ProxyPass / http://localhost:3000/ retry=1
</VirtualHost>

Enable new settings:

sudo a2ensite room.conf 
sudo a2enmod proxy proxy_http
sudo /etc/init.d/apache2 restart

Install Memcached:

sudo apt-get install memcached

Install GIT and build tools

sudo apt-get install git build-essential

Install and configure Room

Install Module::Install from Ubuntu repositories:

sudo apt-get install libmodule-install-perl

Install Catalyst and Catalyst::Devel and other libs from Ubuntu repositories:

sudo apt-get install libcatalyst-devel-perl libcatalyst-perl \
libcrypt-ssleay-perl libobject-signature-perl

Next you will need to install all dependencies for this project. Dependencies will be download from CPAN. Since there are a lot of them it may make sense to enable auto installation of dependencies. To do this, simply bring up a CPAN shell:

perl -MCPAN -e shell

And run these two commands in the CPAN shell:

o conf prerequisites_policy follow
o conf commit

To install all dependencies:

perl Makefile.PL
sudo make installdeps

Check output to see any errors. In my case I had to force-install DBIx::Class::FrozenColumns due failing some tests:

sudo cpan -fi DBIx::Class::FrozenColumns

Copy room-sample.conf to room.conf and edit it inserting correct login/passwords for pythonpokernetwork database, bitcoind, twitter, GA, etc.

Import new schema:

mysql -u root pythonpokernetwork < schema_dump.sql

Replace stock Python Poker Network source code with Room's code

Find where Python Poker Network and Python Poker Engine installed:

find /usr -name "pokerclient.py"
find /usr -name "pokerclient.py"

In my case it was /usr/lib/python2.7/dist-packages and /usr/share/pyshared. Rename existing pokernetwork and pokerengine folders into something else and create soft links to Room's code:

cd /usr/lib/python2.7/dist-packages
sudo mv pokerengine pokerengine.old
sudo mv pokernetwork pokernetwork.old
sudo ln -s ~/projects/Room/lib/ppn/pokerengine pokerengine
sudo ln -s ~/projects/Room/lib/ppn/pokernetwork pokernetwork

And repeat for /usr/share/pyshared.

Install Python bitstring and oauth2 packages:

sudo apt-get install python-pip 
sudo pip install bitstring 
sudo pip install oauth2

And restart poker server:

sudo /etc/init.d/python-poker-network restart

Start Room

From project's home folder run:

./script/room_server.pl -r -f 

Navigate to http://room/ or whatever domain you created for this project.

bitcoin-poker-room's People

Contributors

anisoptera avatar dentldir avatar dooglus avatar gg avatar hippich avatar holic avatar jjn1056 avatar richiela avatar somebadger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoin-poker-room's Issues

Feature Request: Ratholing?

A player I was playing with pointed out that "ratholing" is not allowed in most poker rooms. according to http://www.pokertips.org/glossary/w/RATHOLING:

Ratholing means to leave a game and then come back into the game with a smaller stack then with which you left. For example, suppose you buy into a game for $20. You go on a winning streak and increase your stack to $100. Now, you feel uncomfortable playing with this much money, so you leave the game, pocket $80, and re-enter the game with only $20. This would be a case of ratholing. Ratholing is poor poker etiquette, and most poker rooms prohibit it.

Since it seems that most rooms don't allow this, perhaps it should be implemented here. (although I do not see the problem)

On one hand, I could not see my hole cards

I was sitting at a .10/.25 no limit holdem table and played a few hundred hands or so. On hand #164040, I was given the option to check, but I had no hole cards showing. I checked and played the hand. Once the flop came out, I could deduce the value of my hole cards from the right part of the screen that shows my best 5 card hand, but I couldn't actually see the hole cards.

After hand #164040, everything worked fine and I had no problems in seeing my hole cards in future hands.

Check/fold

Sometimes the check/fold button sticks on for two rounds with is very dangerous. Makes you fold a hand preflop automatically that you did not intend to fold. I have no idea what causes this.

the first bet should be called 'bet', not 'raise'

The poker client doesn't seem to know the difference between 'bet' and 'raise', in the following places:

  1. in the pre-action checkboxes
  2. in the action buttons
  3. in the capitalized description of the player's action just under their avatar
  4. in the deal chat

It would be good if we could show the opening bet (post flop) as 'bet', rather than as 'raise'.

Need a Pre-Call Delay

The check box for calling a specific amount, for example, "call .05" changes instantly when someone raises. This has caused me problems when I mean to click "call .05", but then the person right before me raises something, I accidentally click, and don't have time to unclick before money my is put in. I think that when someone raises the button should be greyed out for a second before you can auto-call the new amount.

This has been one of my biggest problems while playing here. I'm afraid to click the auto-call button.

EDIT: The same needs to be done with the raise button.

Feature request: Rake Top List

Rake top list.

  • Reset each month
  • Each month results saved in another table
  • Top X people receive bonuses (that's probably manually)

Incorrect round of available BTC to withdraw

On the withdraw screen it tells me:
"Available amount to withdraw: 0.42 BTC (41.51 Chips)"
but when I tried to withdraw the available amount, it told me it was an incorrect value.

That's because I didn't really have 42 bitcents - I only had 41.51. So you need to round down, not round to the nearest one.

It let me withdraw 41 bitcents, so that was the problem I guess.

Sound only on action

There should be an extra "sound" option to only play sounds to alert me when it's my turn.

Linux start-up

I didn't succeed to start the script in my linux computer

I try this :
python script/room_server.pl

output:
File "script/room_server.pl", line 3
BEGIN {
^
SyntaxError: invalid syntax

So what the good command line to test the script ?

I can see other people's mucked losing hands

Firefox 4
Windows 7

The dealer accurately reports when someone mucks a losing hand, but I can still see it. A mucked losing hand is not supposed to be shown to anyone.

This seems very high priority to me.

Muck order seems wrong

The order of that people are showing their hands seems wrong. From http://en.wikipedia.org/wiki/Showdown_%28poker%29

"Robert's Rules of Poker state that the last player to take aggressive action by a bet or raise is the first to show the hand—unless everyone checks (or is all-in) on the last round of betting, then the first player to the left of the dealer button is the first to show the hand."

Currently it seems like the person left of the dealer always starts. This is wrong.

chat box lets you type more than it accepts

It's possible to type a long sentence into the chat box, but only a certain number of characters are used in the message you send. After that the rest are lost.

For example:

PhilIvey: well i dont know what to say i guess im just sick of drama thats what benig from a small town tends to bring.umm i love music ma

and:

dooglus: It's possible to type a long sentence into the chat box, but only a certain number of characters are used in the message you sen

ie. only 128 characters are used.

We should either allow longer messages, or limit the amount that can be typed. Silently throwing away text is annoying for the user.

'dead' blinds off by factor of 100

When someone pays small and big blinds at the same time, the dealer chat shows:

Dealer: player pays 1 blind and 50 dead

It should be:

Dealer: player pays 1 blind and 0.50 dead

This is in a 0.50/1.00 game.

In 0.05/0.10 it says:

Dealer: player pays 0.10 blind and 5 dead

and so on.

Fix field for entering bet

The client currently attempts to change the typed value to some acceptable value in the middle of typing. This is counter to how I type bets and I'm sure I'm not alone - I highlight the whole number and type a new one in. When you type a number less than the BB, and you almost always will unless in a .5/1 game, it tries to reformat the number to a valid value. If I were typing "0.75" it would come out ... well, I've seen several results, but none are what we want. Instead we should simply pre-fill the box with the minimum raise amount and let them type whatever they want into the box. When they click "Raise" we can validate that it's a real number before we send it; currently we do NO validation and this can also cause problems. This should be a pretty trivial fix.

server crash?

At approx. Sun Jun 12 15:10:00 PDT 2011 all the tables froze, and when I reloaded, they were empty. People came back one by one, saying they had experienced the same.

Maybe it was just a server reboot or something, but maybe there's something in a logfile that could help diagnose this if it was caused by a bug.

ratholing protection is beatable

The code attempts to stop me leaving a table with more than the max buy-in then coming back and sitting with less than I left with.

This is good.

But - I can cheat it, by doing the following:

  1. leave with more than the buy-in. ratholes[] stores the current time and my stack
  2. come back to the table, click to sit
  3. the buy-in dialog has my previous stack as the min and max buy-in - I'm expected to buy back in with the amount I previously had
  4. cancel the buy-in dialog with the 'x' in the top right
  5. leave the table. ratholes[] stores the current time and my new stack of 0
  6. come back to the table and buy in for whatever amount you like

I guess the fix is not to update ratholes[] if the stack is zero.

inc/ mistakenly committed

inc/ should never be in the repository, only the dist.

We just had a user in #catalyst who'd installed Catalyst::Devel but was getting random errors because your inc/ in the repo is incomplete.

It shouldn't be there at all.

If people want to develop your software, they should check out the repo, install Catalyst::Devel, and run Makefile.PL to populate inc/

If people want to install your software, they should do so from a 'make dist' tarball you've provided.

Hope that clears things up.

-- mst

Buttons remaining after action

After a click on a button has been made, all the buttons should be removed instantly on the client side (raise/fold/call/check). Sometimes there is a delay which means that the button still remains, and the player might think that the first click did not work. When the player clicks again it could be a about a new decision. I once went all in involuntarily because of this (clicked twice on raise but between my first and second click there was a reraise from another player, which I of course was unaware of). It also makes sense to remove all buttons once the player has clicked, because there is nothing else for the player to do but wait for the next time to act.

Account not gaining balance or losing while playing

Was recently playing poker in the 0.01 0.02 blinds room, and started off with 1.5 BTC. After playing for a bit, I lost a little bit of BTC and ended up with about 1.00 BTC. After leaving the poker room, I checked my balance and it stated I had 1.49 BTC. I refreshed and to no avail, it stayed the same. Afterwards, I went and played again and ended up with about 16 BTC. I was excited after winning so much that I left the game to secure my winnings. Once checking my balance again, it stated I once again had 1.49 BTC.

Whats going on?

Please help

Kylemz

Bug in advance action

If you click an advance action e.g. 'check/fold', and your opponent folds
(your advance action isn't executed), a next hand is dealt. In that next
hand, with entirely new cards, your last-hand-advance-action is suddently
executed, resulting in players sometimes autofolding AA :-(

fold/sit-out didn't sit me out properly

I was in a hand and wanted to stop playing.

I clicked 'fold/sit out'.

It folded my hand, and others carried on playing the hand.

I clicked 'exit' in the top right and checked my balance.

My balance didn't include the stack I had at the table with me, so I went back to the table.

I was still at the table, sat out, but being dealt in, and charged blinds.

I took a screenshot: http://replay.marpirc.net/chris/11-06-12-14-56-10.png

It seems that I need to wait longer between clicking 'fold/sit out' and 'exit', but that's not clear.

Session instance has no attribute 'avatar'

I've watched plenty with Chrome and haven't had any problems.
But there seems to be a problem joining a table at the moment, heres the message:

Lost connection to the poker server. Click to retry.
{"xhr":"{"status":500,"responseText":"Traceback (most recent call last):\n File \"/usr/lib/python2.6/dist-packages/twisted/internet/base.py\", line 778, in runUntilCurrent\n call.func(_call.args, *_call.kw)\n File \"/usr/lib/python2.6/dist-packages/pokernetwork/pokeravatar.py\", line 381, in longPollDeferredTimeout\n d.callback(packets)\n File \"/usr/lib/python2.6/dist-packages/twisted/internet/defer.py\", line 280, in callback\n self._startRunCallbacks(result)\n File \"/usr/lib/python2.6/dist-packages/twisted/internet/defer.py\", line 354, in _startRunCallbacks\n self._runCallbacks()\n--- ---\n File \"/usr/lib/python2.6/dist-packages/twisted/internet/defer.py\", line 371, in _runCallbacks\n self.result = callback(self.result, _args, *_kw)\n File \"/usr/lib/python2.6/dist-packages/pokernetwork/pokersite.py\", line 255, in render\n session.site.updateSession(session)\n File \"/usr/lib/python2.6/dist-packages/pokernetwork/pokersite.py\", line 483, in updateSession\n serial = session.avatar.getSerial()\nexceptions.AttributeError: Session instance has no attribute 'avatar'\n","readyState":4}","status":"error","url":"/POKER_REST","error":"Internal Server Error"}attempt to stringify failed with exception: ReferenceError: printStackTrace is not defined

Going "all in" sometimes leaves a bit behind

Often when going "all in" by moving the raise slider all the way to the right and pressing "raise", a tiny bit of your chips are left over. Clearly, the right extreme of the slider should represent all of your chips.

"Raise" does not take into account the money you already have in front of you

"Raise" does not take into account the money you already have in front of you, that is, it's "call and raise this much above what I have". In most poker software it is the absolute amount you are raising to - that is, if you are facing a bet of 2, the software will show the starting raise value as (4 + your current called amount + blind amount if any), and whatever you type will be accepted as the amount you wish to raise to. If you tried to bet less than the minimum it will complain about it. (NOT minraise)

.10/.25 has .12 small blinds

Cerrt 1 is a .10-.25-no-limit holdem table, but:

Dealer: DJHeRobot pays 0.12 blind
Dealer: polymath pays 0.25 blind

the blinds are 12 and 25, not 10 and 25.

Chrome users report clicking "through" the table window.

I don't use chrome myself, but two different chrome users have reported to me that sometime when attempting to click a table button the window behind the table (another chrome window) will be pulled to the front. They report that it seems like they are clicking "through" the game window.

4BB-cap, but raise button remains

It would be a good idea to remove the raise button when the pot is capped. Raising is not an option and might confuse people who are used to uncapped fixed limit, which does exist on some poker rooms

black table screen

When the table window pops up the whole thing is black. I'm running Ubuntu Maverick and FF 3.6.12

I paid BB 4 hands in a row

On a .10/.25 NLH table, during hands 163920-163923, I was sitting in seat 2, with a live player sitting to my right in seat 1, and a player to my left in seat 3, who was sitting out. Player in seat 3 had the button, so player 1 was SB and I (player 2) was BB. For four straight hands, this same scenario repeated. The button did not move, player 1 was always SB, and I was always BB.

In hand 163924, things returned to normal when player 3 joined back into the game. The button moved to player 1, I became SB, and player 3 became BB.

Undefined balance on withdraw page when user do not have any balance yet.

Room::Controller::User 352 /var/www/clients/client1/web31/web/lib/Room/Controller/User.pm

349: my $balance = $c->user->balances->search({currency_serial => 1})->first;
350:
351: $c->stash->{balance} = $balance;
352: $c->stash->{current_balance} = floor($balance->amount * 100) / 100;
353:
354: if ($form->submitted_and_valid) {
355: my $address = $form->params->{bitcoin_address};

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.