public void CreateGame(CreateDebugGameRequest createDebugGameRequest)
        {
            myGateway.Emit("Area.Debug.Create", createDebugGameRequest);

        }
        public void CreateGame(UserLogicModel user, CreateDebugGameRequest data)
        {
            ServerLogger.LogDebug("--debug game created ", data);
            dataManager.SiteData.Game_GetGamesByName(data.GameName, (game) =>
            {
                if (game == null)
                {
                    ServerLogger.LogDebug("--game not found " + data.GameName, user);
                    return;
                }
                ServerLogger.LogDebug("--game found " + game.Name, game);

                DebugGameRoom room;
                rooms.Add(room = new DebugGameRoom());
                room.MaxUsers = data.NumberOfPlayers; //todo idk
                room.GameType = data.GameName;
                room.Started = false;
                for (int i = 0; i < data.NumberOfPlayers; i++)
                {
                    room.Players.Add(user);

                }
                room.DebuggingSender = user;
                
                GameObject evaluated_game = null;
                Script.Eval("evaluated_game=" + processor.ProcessJSFile(game.GameCode.Code));
                GameObject gameObject;
                gameObject = evaluated_game;


                room.Fiber = CreateFiber(room, gameObject, true, game, data.Breakpoints);
                room.Unwind = players =>
                {
                    gameData.FinishedGames++;
                    ServerLogger.LogDebug("--game closed", game);
                };
                room.PlayerLeave += (player) =>
                {
                    //todo laeve player api in the game
                    ////i think an action that it calls

                    room.Players.Remove(player);
                    room.PlayersLeft.Add(player);


                    if (room.Players.Count == 0)
                    { 
                        rooms.Remove(room);
                        room.Fiber.Reset();
                    }
                };

                myServerManager.RegisterGameServer(user);


                startGame(room);
            });
        }
 public void CreateGame(CreateDebugGameRequest createDebugGameRequest)
 {
     clientDebugManager.CreateGame(createDebugGameRequest);
 }