Poker stuff written in javascript