示例#1
0
 public GameForm(IntroForm introform, User user)       //SinglePlayer Constructor
 {
     InitializeComponent();
     this.gp      = new GamePanel(user, Mode.Single);
     gp.gf        = this;
     gp.introform = introform;
     Controls.Add(gp);
     gp.StartGame();
 }
示例#2
0
 public GameForm(String hostIP, int hostPortNumber, IntroForm introForm)      //Guest Constructor
 {
     InitializeComponent();
     this.IntroForm = introForm;
     gp             = new GamePanel(User.Client, Mode.Multi);
     Controls.Add(gp);
     gp.StartGame();
     user = User.Client;
     initClient_Communication(hostIP, hostPortNumber);
     write = false;
     read  = true;
 }
示例#3
0
 public GameForm(int myPortNumber, IntroForm introForm)//Host Constructor
 {
     InitializeComponent();
     this.IntroForm = introForm;
     this.gp        = new GamePanel(User.Host, Mode.Multi);
     Controls.Add(gp);
     gp.StartGame();
     user = User.Host;
     initHost_Communication(myPortNumber);
     write = true;
     read  = false;
 }