Example #1
0
        public GameLogic(Form1 form)
        {
            networkClient = new NetworkClient(this, "localhost" , 31337);

            mainForm = form;
            highscores = new Dictionary<string, int>();
        }
Example #2
0
        public Form1()
        {
            gameLogic = new GameLogic(this);
            networkClient = new NetworkClient(gameLogic, this);
            gameLogic.setNetworkClient(networkClient);

            bot = new Bottle(this);
            highView = new highScoreView(this, gameLogic);
            InitializeComponent();
            timer.Tick += new EventHandler(timer_Tick);
            timer.Interval = 100; //0.1 seconds
            gameLogic.risePercentage = 20;
            lostLabel.Hide();
            resetButton.Hide();
            this.StartPosition = FormStartPosition.CenterScreen;
            gameLogic.highscoreSaved = false;
            highView.Hide();
            this.WindowState = FormWindowState.Minimized;

            setStatus("notConnected");
        }
Example #3
0
 public void setNetworkClient(NetworkClient client)
 {
     networkClient = client;
 }