this.chat.append(this.info_element(user_action.username, "Posts blind of " + user_action.action.chips));
}
break;
+ case "NewBlinds":
+ this.chat.append(this.info_element(user_action.username, "Blinds Up: "
+ + "Level " + user_action.action.level
+ + ": " + user_action.action.small_blind + "/" + user_action.action.big_blind));
+ break;
case "Bet":
const text = user_action.action.chips === 0 ? "Checks" : "Bets " + user_action.action.chips;
this.chat.append(this.info_element(user_action.username, text));
this.pot_size_text = document.createTextNode("");
pot_size.append(this.pot_size_text);
- this.dealer_chip = create_svg_element(this.svg, "ellipse", ["dealer-chip"], [["cx", "250"], ["cy", "250"], ["rx", "10"], ["ry", "5"]]);
+ this.dealer_chip = create_svg_element(this.svg, "ellipse", ["dealer-chip"], [["cx", "250"], ["cy", "250"], ["rx", "10"], ["ry", "5"], ["visibility", "hidden"]]);
const defs = create_svg_element(this.svg, "defs", [], []);
const dealer_chip_gradient = create_svg_element(defs, "radialGradient", [], [["id", "dealer-chip-gradient"]]);
const stop1 = create_svg_element(dealer_chip_gradient, "stop", [], [["offset", "0%"], ["stop-color", "red"]]);
const y = 245 + 52 * Math.cos(angle);
this.dealer_chip.setAttribute("cx", x);
this.dealer_chip.setAttribute("cy", y);
+ this.dealer_chip.setAttribute("visibility", "visible");
+ } else {
+ this.dealer_chip.setAttribute("visibility", "hidden");
}
for (const [username, [user, stack, active, bet]] of this.user_icons) {
if (!this.seats.has(username)) {
this.redraw_cards();
break;
case "RevealCard":
+ this.active = null;
+ this.bet_controls.redraw();
if (!this.user_has_card(user_action.username, user_action.action.card)) {
for (const card of this.hands.get(user_action.username)) {
if (card.card === null) {
this.set_info_text(user_action.username
+ " wins " + user_action.action.chips + " chips"
+ (user_action.action.hand === null ? "" : " with\n" + user_action.action.hand));
+ this.active = null;
this.redraw_players();
+ break;
case "EndDeal":
this.active = this.player_after(user_action.username, username => true);
this.redraw_players();
this.svg.removeChild(card.image);
}
}
+ this.pot = 0;
this.hands.clear();
this.redraw_players();
new CongratulateWinner(this.svg, user_action.username);