Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Poker

A poker application running on node.js with socket.io, using angularJS on the front-end for data binding.

View a demo of the work in progress [here](http://dev.tableflippoker.com/)
View a demo of the work in progress [here](https://bromancepoker.herokuapp.com/)
13 changes: 13 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,19 @@ io.sockets.on('connection', function( socket ) {
}
});

/**
* When a player sets the blind amount
* @param function callback
*/
socket.on('setBlinds', function( amount, callback ) {
if( players[socket.id].sittingOnTable !== false && players[socket.id].seat !== null ) {
// Getting the table id from the player object
var tableId = players[socket.id].sittingOnTable;
tables[tableId].playerChangedBlinds( amount );
callback( { 'success': true } );
}
});

/**
* When a player posts a blind
* @param bool postedBlind (Shows if the user posted the blind or not)
Expand Down
Loading