public override void Setup(AllPlayers all) { this.place = all.place; pc.ShowMessageBox = all.showMessageBox = ShowMessageBox_Menu.Checked; setTitle(); inputname.allplayers = all; inputname.ShowDialog(); this.all = inputname.allplayers; }
/// <summary> /// �}�s�C��(�Ĥ@��) /// </summary> public virtual void newgame() { table.clearAll(); // �]�w4�Ӫ��a,�C�ӤH16�i all = new AllPlayers(4, 16); all.sumBrands = factory.SumBrands; // �]�w�֬O���a IamPlayer(); // �]�w AllPlayers table.Setup(all); // �]�w�P��Ū�쪺��m setupPlace(); newgame_round(); }
public override void newgame() { table.clearAll(); // �]�w4�Ӫ��a,�C�ӤH16�i all = new AllPlayers(4, 16); all.sumBrands = factory.SumBrands; // �]�w�֬O���a IamPlayer(); // �]�w�m�W setName(); // �]�w AllPlayers table.Setup(all); // �]�w�P��Ū�쪺��m setupPlace(); // �إߵP creatBrands(); // �P�B���a��� chat.SendObject(all); check_newgame = true; newgame_round(); }
private void updateAllPlayer(object sender, EventArgs e) { this.all = (AllPlayers)sender; this.table.Allplayers = this.all; table.Setup(all); clientPlace(); this.table.updateAllPlayer(); this.table.updateTable(); this.table.updateInforamation(); //this.table.updateInforamation(); }
/// <summary> /// 設定玩家 /// </summary> /// <param name="all">AllPlayers</param> public virtual void Setup(AllPlayers all) { this.all = all; this.place = all.place; pc.ShowMessageBox = all.showMessageBox = ShowMessageBox_Menu.Checked; setFlowLayout(); setTitle(); }
/// <summary> /// �]�w /// </summary> /// <param name="table">Table</param> /// <param name="all">Allplayers</param> public void setup(Table table,AllPlayers all) { this.table = table; this.all = all; }
public void setPlayer(AllPlayers all) { this.all = all; x = all.NowPlayer; }
public TallyTest() { BrandPlayer a = new BrandPlayer(); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); //a.add(new WordBrand(4)); a.add(new WordBrand(4)); a.add(new WordBrand(4)); ////a.add(new WordBrand(1)); //a.add(new WordBrand(1)); //a.add(new WordBrand(1)); //a.add(new WordBrand(1)); ////a.add(new WordBrand(2)); //a.add(new WordBrand(2)); //a.add(new WordBrand(2)); //a.add(new WordBrand(2)); ////a.add(new WordBrand(3)); //a.add(new WordBrand(3)); //a.add(new WordBrand(3)); //a.add(new WordBrand(3)); f = new Tally(); Location l = new Location(); AllPlayers all = new AllPlayers(4, 16); WordBrand w = new WordBrand(9); WordBrand v = new WordBrand(9); w.WhoPush = location.East; //v.WhoPush = location.Table; all.Show_Table.add(w); //all.NowPlayer.add(v); f.setPlayer(all); f.setPlayer(a); //l.next_Winer(); f.setLocation(l, 0); f.ShowDialog(); }
internal void newgame_network(AllPlayers all) { this.all = all; if (!check_newgame) { table.Setup(all); check_newgame = true; clientPlace(); setInforamtion(); } else { table.Allplayers = all; table.cleanImage(); table.addImage(); setInforamtion(); } }
internal void SendObject(AllPlayers all) { try { if (myMark == "Server") { for (int i = 0; i < n; i++) { socketStream = new NetworkStream(players[i].connection); writer = new BinaryWriter(socketStream); reader = new BinaryReader(socketStream); writer.Write(AllPlayers_Head + getByteArrayWithObject(all).Length.ToString()); writer.Write(getByteArrayWithObject(all)); } } else { writer.Write(AllPlayers_Head + getByteArrayWithObject(all).Length.ToString()); writer.Write(getByteArrayWithObject(all)); } } catch (SocketException) { MessageBox.Show("���f�]�w���~�I"); } }
public byte[] getByteArrayWithObject(AllPlayers all) { MemoryStream ms = new MemoryStream(); BinaryFormatter bf1 = new BinaryFormatter(); bf1.Serialize(ms, all); return ms.ToArray(); }
public TallyTest() { BrandPlayer a = new BrandPlayer(); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new TubeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new RopeBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TenThousandBrand(1)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new TubeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); a.add(new RopeBrand(9)); //a.add(new WordBrand(4)); a.add(new WordBrand(4)); a.add(new WordBrand(4)); ////a.add(new WordBrand(1)); //a.add(new WordBrand(1)); //a.add(new WordBrand(1)); //a.add(new WordBrand(1)); ////a.add(new WordBrand(2)); //a.add(new WordBrand(2)); //a.add(new WordBrand(2)); //a.add(new WordBrand(2)); ////a.add(new WordBrand(3)); //a.add(new WordBrand(3)); //a.add(new WordBrand(3)); //a.add(new WordBrand(3)); f = new Tally(); Location l = new Location(); AllPlayers all = new AllPlayers(4, 16); WordBrand w = new WordBrand(9); WordBrand v = new WordBrand(9); w.WhoPush = location.East; //v.WhoPush = location.Table; all.Show_Table.add(w); //all.NowPlayer.add(v); f.setPlayer(all); f.setPlayer(a); //l.next_Winer(); f.setLocation(l,0); f.ShowDialog(); }