/// <summary>
        /// Once all players are ready, adds players to the Game controller and starts the game
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void start_game_Click(object sender, EventArgs e)
        {
            var ds  = NetworkClasses.GetServer(User.PlayerId, User.LocalIp);
            var row = ds.Tables[0].Rows[0];

            var grabber = NetworkClasses.GetPlayer(int.Parse(row["Host"].ToString()));

            //Host
            LobbyController.AddPlayer(int.Parse(grabber.Tables[0].Rows[0]["Player_ID"].ToString()), grabber.Tables[0].Rows[0]["_Character"].ToString());

            for (var i = 2; i <= 6; i++)
            {
                if (string.IsNullOrEmpty(row["Player_" + i].ToString()))
                {
                    continue;
                }
                grabber = NetworkClasses.GetPlayer(int.Parse(row["Player_" + i].ToString()));
                LobbyController.AddPlayer(int.Parse(grabber.Tables[0].Rows[0]["Player_ID"].ToString()), grabber.Tables[0].Rows[0]["_Character"].ToString());
            }
            NetworkClasses.UpdateServerValue("Status", "In Progress", "Host", User.PlayerId);
            NetworkClasses.UpdateUserValue("User_List", "Online", "In Game", User.PlayerId);
            LobbyController.StartGame();
            Host.StartGame();
            _timer.Stop();
            //_chat.Dispose();
            _gameTimer.Start();
            if (!_profile.IsDisposed)
            {
                _profile.Dispose();
            }
            Hide();

            //MainMenuForm waiter = new MainMenuForm();
            //waiter.Show();
        }
        /// <summary>
        /// Main loop to recieve messages from clients
        /// </summary>
        public static void RecieveLoop()
        {
            NetIncomingMessage inc;

            while (!_shouldStop)
            {
                while ((inc = _server.ReadMessage()) != null)
                {
                    switch (inc.MessageType)
                    {
                    case NetIncomingMessageType.StatusChanged:
                        if (inc.SenderConnection.Status == NetConnectionStatus.Disconnected)
                        {
                            Console.WriteLine("Client " + inc.SenderConnection.ToString() + " status changed: " +
                                              inc.SenderConnection.Status);
                        }
                        break;

                    case NetIncomingMessageType.ConnectionApproval:
                        //Initially approves connecting clients based on their login byte
                        var connectType = inc.ReadByte();
                        if (connectType == (byte)PacketTypes.Login)
                        {
                            inc.SenderConnection.Approve();
                            Players.Add(inc.ReadInt32());
                            if (Players.Count == 6)
                            {
                                NetworkClasses.UpdateServerValue("Status", "Starting", "Host", User.PlayerId);
                            }

                            Console.WriteLine("Approved new connection");
                            Console.WriteLine(inc.SenderConnection + " has connected");
                        }
                        else if (connectType == (byte)PacketTypes.Spectate)
                        {
                            //TODO
                            inc.SenderConnection.Approve();

                            Console.WriteLine("Approved new spectator");
                            Console.WriteLine(inc.SenderConnection + " has connected");
                            Spectators.Add(inc.SenderConnection);
                            Thread.Sleep(50);
                            SendSpecatorStart(inc.SenderConnection);
                        }

                        break;

                    //The data message type encompasses all messages that aren't related to the running
                    //of the lidgren library, to differentiate, we pass different PacketTypes
                    case NetIncomingMessageType.Data:
                        //can only call readByte once, otherwise it continues reading the following bytes
                        var type = inc.ReadByte();

                        if (type == (byte)PacketTypes.Leave)
                        {
                            if (Players.Count == 6)
                            {
                                NetworkClasses.UpdateServerValue("Status", "Creating", "Host", User.PlayerId);
                            }
                            Players.Remove(inc.ReadInt32());
                        }
                        else if (type == (byte)PacketTypes.Action)
                        {
                            var json   = inc.ReadString();
                            var packet = JsonConvert.DeserializeObject <ActionPacket>(json);
                            ReceiveActionUpdate(packet);
                        }

                        else if (type == (byte)PacketTypes.Chat)
                        {
                            var outMsg = _server.CreateMessage();
                            outMsg.Write((byte)PacketTypes.Chat);
                            outMsg.Write(inc.ReadString());
                            _server.SendToAll(outMsg, NetDeliveryMethod.ReliableOrdered);
                        }
                        else if (type == (byte)PacketTypes.Message)
                        {
                            var message = inc.ReadString();
                            PassMessageAlong(message);
                        }
                        else if (type == (byte)PacketTypes.Closed)
                        {
                            ServerStop();
                        }
                        break;

                    default:
                        throw new ArgumentOutOfRangeException();
                    }
                    _server.Recycle(inc);
                }
                Thread.Sleep(50);
            }
        }