Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 public Room GetConcernedRoom()
 {
     return(AsynchronousSocketListener.FindRoomByName(ConcernedRoomName));
 }