separated User from Session - will be need for reconnecting

This commit is contained in:
BetaSteward 2011-06-27 21:50:35 -04:00
parent b55dd5d787
commit bdd8a2a28e
6 changed files with 46 additions and 29 deletions

View file

@ -83,7 +83,7 @@ public class TableController {
match = GameFactory.getInstance().createMatch(options.getGameType(), options);
Session session = SessionManager.getInstance().getSession(sessionId);
if (session != null)
controllerName = session.getUsername();
controllerName = session.getUser().getName();
else
controllerName = "System";
table = new Table(roomId, options.getGameType(), options.getName(), controllerName, DeckValidatorFactory.getInstance().createDeckValidator(options.getDeckType()), options.getPlayerTypes(), match);
@ -96,7 +96,7 @@ public class TableController {
tournament = TournamentFactory.getInstance().createTournament(options.getTournamentType(), options);
Session session = SessionManager.getInstance().getSession(sessionId);
if (session != null)
controllerName = session.getUsername();
controllerName = session.getUser().getName();
else
controllerName = "System";
table = new Table(roomId, options.getTournamentType(), options.getName(), controllerName, DeckValidatorFactory.getInstance().createDeckValidator(options.getMatchOptions().getDeckType()), options.getPlayerTypes(), tournament);