Fix a couple of missed changes.

This commit is contained in:
uecasm 2014-04-09 00:02:54 +12:00
parent 417c97f1b3
commit f14348ab01
2 changed files with 11 additions and 10 deletions

View File

@ -29,7 +29,7 @@ created for the user now.
--%> --%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="javax.servlet.http.HttpSession" %> <%@ page import="javax.servlet.http.HttpSession" %>
<%@ page import="net.socialgamer.cah.data.Game" %> <%@ page import="net.socialgamer.cah.data.GameOptions" %>
<% <%
// Ensure a session exists for the user. // Ensure a session exists for the user.
@SuppressWarnings("unused") @SuppressWarnings("unused")
@ -388,9 +388,9 @@ HttpSession hSession = request.getSession(true);
<label id="score_limit_template_label" for="score_limit_template">Score limit:</label> <label id="score_limit_template_label" for="score_limit_template">Score limit:</label>
<select id="score_limit_template" class="score_limit"> <select id="score_limit_template" class="score_limit">
<% <%
for (int i = Game.MIN_SCORE_LIMIT; i <= Game.MAX_SCORE_LIMIT; i++) { for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) {
%> %>
<option <%= i == Game.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option> <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option>
<% } %> <% } %>
</select> </select>
<br/> <br/>
@ -398,9 +398,9 @@ HttpSession hSession = request.getSession(true);
<select id="player_limit_template" class="player_limit" <select id="player_limit_template" class="player_limit"
aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers.">
<% <%
for (int i = Game.MIN_PLAYER_LIMIT; i <= Game.MAX_PLAYER_LIMIT; i++) { for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) {
%> %>
<option <%= i == Game.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option> <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option>
<% } %> <% } %>
</select> </select>
Having more than 10 players may get cramped! Having more than 10 players may get cramped!
@ -409,9 +409,9 @@ HttpSession hSession = request.getSession(true);
<select id="spectator_limit_template" class="spectator_limit" <select id="spectator_limit_template" class="spectator_limit"
aria-label="Spectator limit."> aria-label="Spectator limit.">
<% <%
for (int i = Game.MIN_SPECTATOR_LIMIT; i <= Game.MAX_SPECTATOR_LIMIT; i++) { for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) {
%> %>
<option <%= i == Game.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option> <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option>
<% } %> <% } %>
</select> </select>
Spectators can watch and chat, but not actually play. Not even as Czar. Spectators can watch and chat, but not actually play. Not even as Czar.
@ -434,9 +434,9 @@ HttpSession hSession = request.getSession(true);
<label id="blanks_limit_label" title="Blank cards allow a player to type in their own answer."> <label id="blanks_limit_label" title="Blank cards allow a player to type in their own answer.">
Also include <select id="blanks_limit_template" class="blanks_limit"> Also include <select id="blanks_limit_template" class="blanks_limit">
<% <%
for (int i = Game.MIN_BLANK_CARD_LIMIT; i <= Game.MAX_BLANK_CARD_LIMIT; i++) { for (int i = GameOptions.MIN_BLANK_CARD_LIMIT; i <= GameOptions.MAX_BLANK_CARD_LIMIT; i++) {
%> %>
<option <%= i == Game.DEFAULT_BLANK_CARD_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option> <option <%= i == GameOptions.DEFAULT_BLANK_CARD_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %></option>
<% } %> <% } %>
</select> blank white cards. </select> blank white cards.
</label> </label>

View File

@ -639,7 +639,8 @@ public class Game {
if (started) { if (started) {
logger.info(String.format("Starting game %d with card sets %s, %d blanks, %d max players, " + logger.info(String.format("Starting game %d with card sets %s, %d blanks, %d max players, " +
"%d max spectators, %d score limit, players %s.", "%d max spectators, %d score limit, players %s.",
id, cardSetIds, blanksInDeck, playerLimit, spectatorLimit, scoreGoal, players)); id, options.cardSetIds, options.blanksInDeck, options.playerLimit,
options.spectatorLimit, options.scoreGoal, players));
// do this stuff outside the players lock; they will lock players again later for much less // do this stuff outside the players lock; they will lock players again later for much less
// time, and not at the same time as trying to lock users, which has caused deadlocks // time, and not at the same time as trying to lock users, which has caused deadlocks
synchronized (options.cardSetIds) { synchronized (options.cardSetIds) {