public LogonResult Logon(LogonCommand logon) { if (IsValidLogonRequest(logon)) { return _gameManager.Execute(logon); } return null; }
private bool IsValidLogonRequest(LogonCommand logon) { if (logon != null && !string.IsNullOrWhiteSpace(logon.AgentName)) { return true; } return false; }
public LogonResult Execute(LogonCommand command) { var game = GetNewGame(); game.LogonDemoAgent("DemoAgent"); var result = game.LogonPlayer(command.AgentName); return result; }