proppy / jpoker (http://jspoker.pokersource.info/)

javascript poker client

Clone this repository (size: 13.4 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/proppy/jpoker/

Changed (Δ87 bytes):

raw changeset »

jpoker/js/jquery.jpoker.js (3 lines added, 3 lines removed)

jpoker/js/test-jpoker.js (12 lines added, 12 lines removed)

Up to file-list jpoker/js/jquery.jpoker.js:

4293
4293
		$('.jpoker_auto_action', auto_action_element).show();
4294
4294
		if (table.betLimit.call > 0) {
4295
4295
		    $('.jpoker_auto_check', auto_action_element).hide();
4296
		    $('.jpoker_call_amount', auto_action_element).text(table.betLimit.call);
4296
		    $('.jpoker_call_amount', auto_action_element).text(jpoker.chips.SHORT(table.betLimit.call));
4297
4297
		} else {
4298
4298
		    $('.jpoker_auto_call', auto_action_element).hide();
4299
4299
		}
4312
4312
		    $('input[name=auto_raise]')[0].checked = false;
4313
4313
		    $('.jpoker_auto_check', auto_action_element).hide();
4314
4314
		    $('.jpoker_auto_call', auto_action_element).show();
4315
		    $('.jpoker_call_amount', auto_action_element).text(table.betLimit.call);
4315
		    $('.jpoker_call_amount', auto_action_element).text(jpoker.chips.SHORT(table.betLimit.call));
4316
4316
		}
4317
4317
	    }
4318
4318
	},
4451
4451
            $('#fold' + id).unbind('click').click(function() { return send('Fold'); }).show();
4452
4452
            if(betLimit.call > 0) {		
4453
4453
		var call_element = $('#call' + id);
4454
		$('.jpoker_call_amount', call_element).text(betLimit.call);
4454
		$('.jpoker_call_amount', call_element).text(jpoker.chips.SHORT(betLimit.call));
4455
4455
		call_element.unbind('click').click(function() { return send('Call'); }).show();
4456
4456
            } else {
4457
4457
                $('#check' + id).unbind('click').click(function() { return send('Check'); }).show();

Up to file-list jpoker/js/test-jpoker.js:

@@ -8406,24 +8406,24 @@ test("jpoker.plugins.playerSelf call wit
8406
8406
	player.in_game = true;
8407
8407
        var table = server.tables[game_id];
8408
8408
        table.betLimit = {
8409
            min:   5,
8410
            max:   10,
8411
            step:  1,
8412
            call:  10,
8413
            allin:40,
8414
            pot:  20
8409
            min:   5000,
8410
            max:   10000,
8411
            step:  1000,
8412
            call:  10000,
8413
            allin:40000,
8414
            pot:  20000
8415
8415
        };
8416
8416
	
8417
8417
	var auto_action_element = $('#auto_action' + id);
8418
8418
8419
8419
	table.handler(server, game_id, { type: 'PacketPokerBeginRound', game_id: game_id });
8420
	equals($('.jpoker_auto_call label .jpoker_call_amount', auto_action_element).text(), '10', 'auto_call label');
8421
	table.betLimit.call = 20;
8420
	equals($('.jpoker_auto_call label .jpoker_call_amount', auto_action_element).text(), '10K', 'auto_call label');
8421
	table.betLimit.call = 20000;
8422
8422
	table.handler(server, game_id, { type: 'PacketPokerHighestBetIncrease', game_id: game_id });
8423
	equals($('.jpoker_auto_call label .jpoker_call_amount', auto_action_element).text(), '20', 'auto_call label');
8424
	table.betLimit.call = 30;
8425
	table.handler(server, game_id, { type: 'PacketPokerSelfInPosition', serial: player_serial, game_id: game_id });
8426
	equals($('#call' + id + ' .jpoker_call_amount').text(), '30', 'call label');
8423
	equals($('.jpoker_auto_call label .jpoker_call_amount', auto_action_element).text(), '20K', 'auto_call label');
8424
	table.betLimit.call = 30000;
8425
	table.handler(server, game_id, { type: 'PacketPokerSelfInPosition', serial: player_serial, game_id: game_id });
8426
	equals($('#call' + id + ' .jpoker_call_amount').text(), '30K', 'call label');
8427
8427
	cleanup(id);
8428
8428
    });
8429
8429