dmorrill10 / acpc_poker_gui_client

Rails application that allows humans to play poker matches managed by the Annual Computer Poker Competition's Dealer program in a web GUI.
56 stars 37 forks source link

Add keyboard shortcuts for taking actions #13

Closed dmorrill10 closed 11 years ago

dmorrill10 commented 12 years ago

This might be easy.

Could maybe be extended to mouse or finger gestures, like tapping the table for check/call and flicking the cards for fold.

Should look into keyboard shortcuts with jquery.hotkeys. Could look into gestures with hammer.js, but looks like jQuery UI may do the trick more simply.

dmorrill10 commented 12 years ago

Hotkeys are now implemented (A => fold, S => check/call, D => bet/raise, Q => leave match, F => next hand), but they aren't documented anywhere. Would be great if I could provide a drop down menu showing users the shortcuts and allowing users to specify them. This could be tricky though...

I think I'll have to save a bunch of settings to the Match model (including 'auto proceed to next hand' option). I'm a little concerned by the performance hit this will cause, but it actually might be minimal since I already have to access the same Match model every action. The only extra db interaction will be saving user preferences from the view.

dmorrill10 commented 11 years ago

Hotkeys are now documented in a dropdown on the toolbar. Not customizable yet, but I'll wait for a new issue to be raised before doing that.