Ejemplo n.º 1
0
 public highScoreView(Form1 form, GameLogic gamelog)
 {
     InitializeComponent();
     this.StartPosition = FormStartPosition.CenterScreen;
     this.game = gamelog;
     this.littleForm = form;
 }
Ejemplo n.º 2
0
 public NetworkClient(GameLogic logic, Form1 form)
 {
     gameLogic = logic;
     mainForm = form;
     formatter = new BinaryFormatter();
     tcpClient = new TcpClient();
 }
Ejemplo n.º 3
0
 public NetworkClient(GameLogic logic, string newIp, int newPort)
 {
     ipAdress = newIp;
     port = newPort;
     gameLogic = logic;
     formatter = new BinaryFormatter();
     tcpClient = new TcpClient();
 }
Ejemplo n.º 4
0
 public Form1()
 {
     gameLogic = new GameLogic(this);
     if (gameLogic.connectToServer() == false) new CouldNotConnect(gameLogic);
     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();
     setHighScoreListInfoDictionary(gameLogic.getHighscoresDictionary());
 }
Ejemplo n.º 5
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");
        }
Ejemplo n.º 6
0
 public CouldNotConnect(GameLogic newGameLogic)
 {
     InitializeComponent();
     gameLogic = newGameLogic;
     this.Show();
 }