Exemple #1
0
        public static string ForceMessageThrough(string concernedRoom, string command, string commandArgs)
        {
            AsynchronousSocketListener.FindRoomByName(concernedRoom).Log.Add(command + ":" + commandArgs);
            string returnString = "success";

            Console.WriteLine("Function not yet implented, had to force through: " + command + ":" + commandArgs);
            return(returnString);
        }
Exemple #2
0
        public static string RequestRoomLog(string roomName, int index)
        {
            string returnString = "";

            for (int i = index; i < AsynchronousSocketListener.FindRoomByName(roomName).Log.Count; i++)
            {
                returnString = returnString + AsynchronousSocketListener.FindRoomByName(roomName).Log[i] + "*";
            }

            return(returnString);
        }
Exemple #3
0
        public static string CreateRankedGame(NetworkMessage message)
        {
            string[] args = message.CommandArgs.Split(">".ToCharArray());


            Room room = AsynchronousSocketListener.MakeARoom(message);

            room.Rank    = Int32.Parse(args[0]);
            room.RoomMap = new SwampOfSorrows();
            room.RoomMap.StartMap();

            string returnString = "success";

            return(returnString);
        }
Exemple #4
0
        public static string PlayerJoinedRoom(NetworkMessage message)
        {
            string returnString = "success";

            string[] args     = message.CommandArgs.Split(">".ToCharArray());
            string   roomName = args[0];

            if (AsynchronousSocketListener.FindRoomByName(roomName).WaitingForPlayers())
            {
                AsynchronousSocketListener.FindRoomByName(roomName).AddPlayerToRoom(message);
            }
            else
            {
                returnString = "nope";
            }
            return(returnString);
        }
Exemple #5
0
 public Room GetConcernedRoom()
 {
     return(AsynchronousSocketListener.FindRoomByName(ConcernedRoomName));
 }