public void ReadyToStartGame() { if (_users.UserExists(Context.ConnectionId)) { try { User user = Users.Instance.GetUser(Context.ConnectionId); if (user.InMatch()) { user.CurrentMatch.UserReady(user); } } catch (Exception ex) { ErrorLog.Instance.Log(ex); } } }
public void Move(string where) { if (_users.UserExists(Context.ConnectionId)) { try { User user = Users.Instance.GetUser(Context.ConnectionId); if (user.InMatch()) { MovementFlag direction = (MovementFlag)Enum.Parse(typeof(MovementFlag), where); user.CurrentMatch.Game.CommandHandler.MovementCommand(user, direction); } } catch (Exception ex) { ErrorLog.Instance.Log(ex); } } }