TODO cleanup
This commit is contained in:
parent
83a807f4b8
commit
a5f82eb08e
|
@ -22,8 +22,6 @@ cah.ajax.ErrorHandlers[cah.$.AjaxOperation.REGISTER] = function(data) {
|
|||
|
||||
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.FIRST_LOAD] = function(data) {
|
||||
if (data.in_progress) {
|
||||
// TODO reload data. see what 'next' is and go from there.
|
||||
// for now just load the nickname
|
||||
cah.nickname = data['nickname'];
|
||||
cah.log.status("You have reconnected as " + cah.nickname);
|
||||
$("#nickbox").hide();
|
||||
|
@ -45,7 +43,7 @@ cah.ajax.SuccessHandlers[cah.$.AjaxOperation.FIRST_LOAD] = function(data) {
|
|||
};
|
||||
|
||||
cah.ajax.ErrorHandlers[cah.$.AjaxOperation.FIRST_LOAD] = function(data) {
|
||||
// TODO dunno what to do here, if anything
|
||||
// pass
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -190,6 +190,8 @@ cah.Game = function(id) {
|
|||
/**
|
||||
* Load game data from the server and display the game lobby.
|
||||
*
|
||||
* TODO reload round win state
|
||||
*
|
||||
* @param {number}
|
||||
* gameId The game id.
|
||||
*/
|
||||
|
|
|
@ -20,21 +20,12 @@ import org.hibernate.dialect.PostgreSQLDialect;
|
|||
public class Schema extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @see HttpServlet#HttpServlet()
|
||||
*/
|
||||
public Schema() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
*/
|
||||
@Override
|
||||
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// TODO Auto-generated method stub
|
||||
final AnnotationConfiguration c = new AnnotationConfiguration();
|
||||
c.configure();
|
||||
final String[] ls = c.generateSchemaCreationScript(new PostgreSQLDialect());
|
||||
|
|
|
@ -28,14 +28,6 @@ public class TestServlet extends HttpServlet {
|
|||
|
||||
private SessionFactory sessionFactory;
|
||||
|
||||
/**
|
||||
* @see HttpServlet#HttpServlet()
|
||||
*/
|
||||
public TestServlet() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
|
||||
|
@ -47,7 +39,6 @@ public class TestServlet extends HttpServlet {
|
|||
@Override
|
||||
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
// TODO Auto-generated method stub
|
||||
// response.setCharacterEncoding("UTF-8");
|
||||
final PrintWriter out = response.getWriter();
|
||||
// ServletOutputStream out = response.getOutputStream();
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
@ -120,7 +121,11 @@ public class GameManager implements Provider<Integer> {
|
|||
if (nextId == -1 || games.containsKey(nextId)) {
|
||||
nextId = gameId;
|
||||
}
|
||||
// TODO remove the players from the game
|
||||
// remove the players from the game
|
||||
final List<User> users = game.getUsers();
|
||||
for (final User user : users) {
|
||||
game.removePlayer(user);
|
||||
}
|
||||
|
||||
broadcastGameListRefresh();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public class FirstLoadHandler extends Handler {
|
|||
ret.put(AjaxResponse.IN_PROGRESS, Boolean.TRUE);
|
||||
ret.put(AjaxResponse.NICKNAME, user.getNickname());
|
||||
|
||||
// TODO more
|
||||
if (user.getGame() != null) {
|
||||
ret.put(AjaxResponse.NEXT, ReconnectNextAction.GAME.toString());
|
||||
ret.put(AjaxResponse.GAME_ID, user.getGame().getId());
|
||||
|
|
|
@ -33,7 +33,7 @@ public class NamesHandler extends Handler {
|
|||
public Map<ReturnableData, Object> handle(final RequestWrapper request,
|
||||
final HttpSession session) {
|
||||
final Map<ReturnableData, Object> ret = new HashMap<ReturnableData, Object>();
|
||||
// TODO once there are multiple rooms, we needCollection<E>hich one was asked for
|
||||
// TODO once there are multiple rooms, we need which one was asked for
|
||||
final Collection<User> userList = users.getUsers();
|
||||
final List<String> names = new ArrayList<String>(userList.size());
|
||||
for (final User u : userList) {
|
||||
|
|
Loading…
Reference in New Issue