diff --git "a/ind\303\255t\303\263k\303\251perny\305\221.png" "b/ind\303\255t\303\263k\303\251perny\305\221.png" deleted file mode 100644 index d58bae3c58564d7572bf1ab340a76aa6e59d02f1..0000000000000000000000000000000000000000 Binary files "a/ind\303\255t\303\263k\303\251perny\305\221.png" and /dev/null differ diff --git "a/j\303\241t\303\251k_v\303\251ge_ablak.png" "b/j\303\241t\303\251k_v\303\251ge_ablak.png" deleted file mode 100644 index acc24361d7f14fa22b32b4b3096edeb45436d3ff..0000000000000000000000000000000000000000 Binary files "a/j\303\241t\303\251k_v\303\251ge_ablak.png" and /dev/null differ diff --git "a/j\303\241t\303\251kablak_v\303\241zlat.png" "b/j\303\241t\303\251kablak_v\303\241zlat.png" deleted file mode 100644 index cef6777b2650463af021a60fb79471e14f83dd72..0000000000000000000000000000000000000000 Binary files "a/j\303\241t\303\251kablak_v\303\241zlat.png" and /dev/null differ diff --git "a/t\303\251malab_spec.txt" "b/t\303\251malab_spec.txt" deleted file mode 100644 index 9e2bedd4263fc132f3b07edfa6fd6121a901f974..0000000000000000000000000000000000000000 --- "a/t\303\251malab_spec.txt" +++ /dev/null @@ -1,10 +0,0 @@ -A program célja megavósítani a magyar kártyás zsírozást, annak is a páralkotás és közbefogás nélküli változatát. -(https://hu.wikipedia.org/wiki/Zs%C3%ADroz%C3%A1s) - -Minden játék 2 vagy több (vastag-)kliens és egy szerver között történik a lokális hálózaton. Ezek közvetlen TCP kapcsolaton kommunikálnak egy saját protokollal. - -A játék elsősorban asztali GNU/Linux-hoz készül, de futni fog Windows-on is. -A játék logika szerver oldalon lesz megvalósítva, a kliensek a megjelenítésért felelősek. - -Minden, a szerverre belépett felhasználó létrehozhat szobákat, ahova másokat meghívhat. A meghívás elfogadása beléptet a szobába. -Ha egy szoba elérte a megfelelő létszámot, elindítható a játék. diff --git a/zsirozas/Form1.Designer.cs b/zsirozas/Form1.Designer.cs index caae7575e825e1044d270ce3c23e102d121aecef..7acc9ec6f93bb8151576c58754069530dd550525 100644 --- a/zsirozas/Form1.Designer.cs +++ b/zsirozas/Form1.Designer.cs @@ -40,18 +40,10 @@ namespace zsirozas this.label7 = new System.Windows.Forms.Label(); this.textBoxIncomingPort = new System.Windows.Forms.TextBox(); this.textBoxUserNickname = new System.Windows.Forms.TextBox(); - this.buttonSearchForServers = new System.Windows.Forms.Button(); this.buttonConnect = new System.Windows.Forms.Button(); - this.listBoxServers = new System.Windows.Forms.ListBox(); - this.buttonStopLocalServer = new System.Windows.Forms.Button(); - this.buttonStartLocalServer = new System.Windows.Forms.Button(); - this.textBoxLocalhostPort = new System.Windows.Forms.TextBox(); this.buttonServerTest = new System.Windows.Forms.Button(); this.textBoxServerPort = new System.Windows.Forms.TextBox(); this.textBoxServerAddr = new System.Windows.Forms.TextBox(); - this.radioButtonFindServers = new System.Windows.Forms.RadioButton(); - this.radioButtonLocalServer = new System.Windows.Forms.RadioButton(); - this.radioButtonManual = new System.Windows.Forms.RadioButton(); this.tabPageServer = new System.Windows.Forms.TabPage(); this.panel3 = new System.Windows.Forms.Panel(); this.buttonRefreshServer = new System.Windows.Forms.Button(); @@ -60,12 +52,12 @@ namespace zsirozas this.labelOwnRoomName = new System.Windows.Forms.Label(); this.buttonCreateRoom = new System.Windows.Forms.Button(); this.listBoxOwnRoom = new System.Windows.Forms.ListBox(); + this.buttonStartGame = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.listBoxUsers = new System.Windows.Forms.ListBox(); this.listBoxRooms = new System.Windows.Forms.ListBox(); - this.label6 = new System.Windows.Forms.Label(); - this.buttonStartGame = new System.Windows.Forms.Button(); + this.labelBigRoom = new System.Windows.Forms.Label(); this.tabPageGame = new System.Windows.Forms.TabPage(); this.panelPlayers = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -122,18 +114,10 @@ namespace zsirozas this.tabPageWelcome.Controls.Add(this.label7); this.tabPageWelcome.Controls.Add(this.textBoxIncomingPort); this.tabPageWelcome.Controls.Add(this.textBoxUserNickname); - this.tabPageWelcome.Controls.Add(this.buttonSearchForServers); this.tabPageWelcome.Controls.Add(this.buttonConnect); - this.tabPageWelcome.Controls.Add(this.listBoxServers); - this.tabPageWelcome.Controls.Add(this.buttonStopLocalServer); - this.tabPageWelcome.Controls.Add(this.buttonStartLocalServer); - this.tabPageWelcome.Controls.Add(this.textBoxLocalhostPort); this.tabPageWelcome.Controls.Add(this.buttonServerTest); this.tabPageWelcome.Controls.Add(this.textBoxServerPort); this.tabPageWelcome.Controls.Add(this.textBoxServerAddr); - this.tabPageWelcome.Controls.Add(this.radioButtonFindServers); - this.tabPageWelcome.Controls.Add(this.radioButtonLocalServer); - this.tabPageWelcome.Controls.Add(this.radioButtonManual); this.tabPageWelcome.Location = new System.Drawing.Point(4, 22); this.tabPageWelcome.Name = "tabPageWelcome"; this.tabPageWelcome.Padding = new System.Windows.Forms.Padding(3); @@ -144,28 +128,30 @@ namespace zsirozas // // panel4 // - this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panel4.BackColor = System.Drawing.Color.Wheat; this.panel4.Controls.Add(this.textBoxSignalRUrl); this.panel4.Controls.Add(this.buttonUseSignalR); - this.panel4.Location = new System.Drawing.Point(366, 281); + this.panel4.Location = new System.Drawing.Point(41, 254); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(307, 69); + this.panel4.Size = new System.Drawing.Size(589, 69); this.panel4.TabIndex = 14; + this.panel4.Visible = false; // // textBoxSignalRUrl // this.textBoxSignalRUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.textBoxSignalRUrl.Location = new System.Drawing.Point(19, 31); this.textBoxSignalRUrl.Name = "textBoxSignalRUrl"; - this.textBoxSignalRUrl.Size = new System.Drawing.Size(173, 20); + this.textBoxSignalRUrl.Size = new System.Drawing.Size(455, 20); this.textBoxSignalRUrl.TabIndex = 1; this.textBoxSignalRUrl.Text = "http://127.0.0.1:9080"; // // buttonUseSignalR // this.buttonUseSignalR.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.buttonUseSignalR.Location = new System.Drawing.Point(198, 14); + this.buttonUseSignalR.Location = new System.Drawing.Point(480, 14); this.buttonUseSignalR.Name = "buttonUseSignalR"; this.buttonUseSignalR.Size = new System.Drawing.Size(93, 37); this.buttonUseSignalR.TabIndex = 0; @@ -177,7 +163,7 @@ namespace zsirozas // this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(441, 213); + this.label8.Location = new System.Drawing.Point(466, 49); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(53, 13); this.label8.TabIndex = 13; @@ -185,9 +171,9 @@ namespace zsirozas // // label7 // - this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(441, 249); + this.label7.Location = new System.Drawing.Point(41, 90); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(98, 13); this.label7.TabIndex = 12; @@ -195,36 +181,26 @@ namespace zsirozas // // textBoxIncomingPort // - this.textBoxIncomingPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxIncomingPort.Location = new System.Drawing.Point(564, 246); + this.textBoxIncomingPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); + this.textBoxIncomingPort.Location = new System.Drawing.Point(148, 87); this.textBoxIncomingPort.Name = "textBoxIncomingPort"; - this.textBoxIncomingPort.Size = new System.Drawing.Size(41, 20); + this.textBoxIncomingPort.Size = new System.Drawing.Size(46, 20); this.textBoxIncomingPort.TabIndex = 11; this.textBoxIncomingPort.Text = "6501"; // // textBoxUserNickname // this.textBoxUserNickname.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxUserNickname.Location = new System.Drawing.Point(505, 210); + this.textBoxUserNickname.Location = new System.Drawing.Point(530, 46); this.textBoxUserNickname.Name = "textBoxUserNickname"; this.textBoxUserNickname.Size = new System.Drawing.Size(100, 20); this.textBoxUserNickname.TabIndex = 10; this.textBoxUserNickname.Text = "pistike"; // - // buttonSearchForServers - // - this.buttonSearchForServers.Enabled = false; - this.buttonSearchForServers.Location = new System.Drawing.Point(200, 107); - this.buttonSearchForServers.Name = "buttonSearchForServers"; - this.buttonSearchForServers.Size = new System.Drawing.Size(43, 23); - this.buttonSearchForServers.TabIndex = 9; - this.buttonSearchForServers.Text = "Keres"; - this.buttonSearchForServers.UseVisualStyleBackColor = true; - // // buttonConnect // this.buttonConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonConnect.Location = new System.Drawing.Point(460, 131); + this.buttonConnect.Location = new System.Drawing.Point(481, 90); this.buttonConnect.Name = "buttonConnect"; this.buttonConnect.Size = new System.Drawing.Size(149, 23); this.buttonConnect.TabIndex = 8; @@ -232,51 +208,6 @@ namespace zsirozas this.buttonConnect.UseVisualStyleBackColor = true; this.buttonConnect.Click += new System.EventHandler(this.buttonConnect_Click); // - // listBoxServers - // - this.listBoxServers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.listBoxServers.Enabled = false; - this.listBoxServers.FormattingEnabled = true; - this.listBoxServers.Location = new System.Drawing.Point(41, 142); - this.listBoxServers.Name = "listBoxServers"; - this.listBoxServers.Size = new System.Drawing.Size(303, 199); - this.listBoxServers.TabIndex = 7; - // - // buttonStopLocalServer - // - this.buttonStopLocalServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonStopLocalServer.Enabled = false; - this.buttonStopLocalServer.Location = new System.Drawing.Point(564, 49); - this.buttonStopLocalServer.Name = "buttonStopLocalServer"; - this.buttonStopLocalServer.Size = new System.Drawing.Size(45, 23); - this.buttonStopLocalServer.TabIndex = 6; - this.buttonStopLocalServer.Text = "Leállít"; - this.buttonStopLocalServer.UseVisualStyleBackColor = true; - this.buttonStopLocalServer.Click += new System.EventHandler(this.buttonStopLocalServer_Click); - // - // buttonStartLocalServer - // - this.buttonStartLocalServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonStartLocalServer.Enabled = false; - this.buttonStartLocalServer.Location = new System.Drawing.Point(514, 49); - this.buttonStartLocalServer.Name = "buttonStartLocalServer"; - this.buttonStartLocalServer.Size = new System.Drawing.Size(44, 23); - this.buttonStartLocalServer.TabIndex = 5; - this.buttonStartLocalServer.Text = "Indít"; - this.buttonStartLocalServer.UseVisualStyleBackColor = true; - this.buttonStartLocalServer.Click += new System.EventHandler(this.buttonStartLocalServer_Click); - // - // textBoxLocalhostPort - // - this.textBoxLocalhostPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxLocalhostPort.Enabled = false; - this.textBoxLocalhostPort.Location = new System.Drawing.Point(460, 49); - this.textBoxLocalhostPort.Name = "textBoxLocalhostPort"; - this.textBoxLocalhostPort.Size = new System.Drawing.Size(48, 20); - this.textBoxLocalhostPort.TabIndex = 4; - // // buttonServerTest // this.buttonServerTest.Location = new System.Drawing.Point(200, 49); @@ -303,44 +234,6 @@ namespace zsirozas this.textBoxServerAddr.TabIndex = 1; this.textBoxServerAddr.Text = "127.0.0.1"; // - // radioButtonFindServers - // - this.radioButtonFindServers.AutoSize = true; - this.radioButtonFindServers.Enabled = false; - this.radioButtonFindServers.Location = new System.Drawing.Point(28, 107); - this.radioButtonFindServers.Name = "radioButtonFindServers"; - this.radioButtonFindServers.Size = new System.Drawing.Size(148, 17); - this.radioButtonFindServers.TabIndex = 0; - this.radioButtonFindServers.Text = "Keresés a helyi hálózaton:"; - this.radioButtonFindServers.UseVisualStyleBackColor = true; - this.radioButtonFindServers.CheckedChanged += new System.EventHandler(this.radioButtonFindServers_CheckedChanged); - // - // radioButtonLocalServer - // - this.radioButtonLocalServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.radioButtonLocalServer.AutoSize = true; - this.radioButtonLocalServer.Enabled = false; - this.radioButtonLocalServer.Location = new System.Drawing.Point(439, 25); - this.radioButtonLocalServer.Name = "radioButtonLocalServer"; - this.radioButtonLocalServer.Size = new System.Drawing.Size(171, 17); - this.radioButtonLocalServer.TabIndex = 0; - this.radioButtonLocalServer.Text = "Szerver indítása a helyi gépen:"; - this.radioButtonLocalServer.UseVisualStyleBackColor = true; - this.radioButtonLocalServer.CheckedChanged += new System.EventHandler(this.radioButtonLocalServer_CheckedChanged); - // - // radioButtonManual - // - this.radioButtonManual.AutoSize = true; - this.radioButtonManual.Checked = true; - this.radioButtonManual.Location = new System.Drawing.Point(28, 25); - this.radioButtonManual.Name = "radioButtonManual"; - this.radioButtonManual.Size = new System.Drawing.Size(149, 17); - this.radioButtonManual.TabIndex = 0; - this.radioButtonManual.TabStop = true; - this.radioButtonManual.Text = "Szerver megadása kézzel:"; - this.radioButtonManual.UseVisualStyleBackColor = true; - this.radioButtonManual.CheckedChanged += new System.EventHandler(this.radioButtonManual_CheckedChanged); - // // tabPageServer // this.tabPageServer.Controls.Add(this.panel3); @@ -349,7 +242,7 @@ namespace zsirozas this.tabPageServer.Controls.Add(this.label1); this.tabPageServer.Controls.Add(this.listBoxUsers); this.tabPageServer.Controls.Add(this.listBoxRooms); - this.tabPageServer.Controls.Add(this.label6); + this.tabPageServer.Controls.Add(this.labelBigRoom); this.tabPageServer.Location = new System.Drawing.Point(4, 22); this.tabPageServer.Name = "tabPageServer"; this.tabPageServer.Padding = new System.Windows.Forms.Padding(3); @@ -430,6 +323,17 @@ namespace zsirozas this.listBoxOwnRoom.TabIndex = 0; this.listBoxOwnRoom.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxOwnRoom_MouseDoubleClick); // + // buttonStartGame + // + this.buttonStartGame.Enabled = false; + this.buttonStartGame.Location = new System.Drawing.Point(165, 39); + this.buttonStartGame.Name = "buttonStartGame"; + this.buttonStartGame.Size = new System.Drawing.Size(75, 23); + this.buttonStartGame.TabIndex = 0; + this.buttonStartGame.Text = "Játék"; + this.buttonStartGame.UseVisualStyleBackColor = true; + this.buttonStartGame.Click += new System.EventHandler(this.buttonStartGame_Click); + // // label2 // this.label2.AutoSize = true; @@ -469,28 +373,16 @@ namespace zsirozas this.listBoxRooms.Size = new System.Drawing.Size(101, 329); this.listBoxRooms.TabIndex = 2; this.listBoxRooms.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxRooms_MouseDoubleClick); - //this.listBoxRooms.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBoxRooms_DrawItem); - // - // label6 // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(251, 45); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(219, 26); - this.label6.TabIndex = 1; - this.label6.Text = "Jelenleg nincsnek külön szobák a szerveren.\r\nMindenki a RoomZero szoba tagja."; - this.label6.Visible = false; - // - // buttonStartGame + // labelBigRoom // - this.buttonStartGame.Enabled = false; - this.buttonStartGame.Location = new System.Drawing.Point(165, 39); - this.buttonStartGame.Name = "buttonStartGame"; - this.buttonStartGame.Size = new System.Drawing.Size(75, 23); - this.buttonStartGame.TabIndex = 0; - this.buttonStartGame.Text = "Játék"; - this.buttonStartGame.UseVisualStyleBackColor = true; - this.buttonStartGame.Click += new System.EventHandler(this.buttonStartGame_Click); + this.labelBigRoom.AutoSize = true; + this.labelBigRoom.Location = new System.Drawing.Point(251, 45); + this.labelBigRoom.Name = "labelBigRoom"; + this.labelBigRoom.Size = new System.Drawing.Size(219, 26); + this.labelBigRoom.TabIndex = 1; + this.labelBigRoom.Text = "Jelenleg nincsnek külön szobák a szerveren.\r\nMindenki a RoomZero szoba tagja."; + this.labelBigRoom.Visible = false; // // tabPageGame // @@ -778,17 +670,9 @@ namespace zsirozas private System.Windows.Forms.Label labelCardsDealt; private System.Windows.Forms.Label label3; private System.Windows.Forms.Button buttonConnect; - private System.Windows.Forms.ListBox listBoxServers; - private System.Windows.Forms.Button buttonStopLocalServer; - private System.Windows.Forms.Button buttonStartLocalServer; - private System.Windows.Forms.TextBox textBoxLocalhostPort; private System.Windows.Forms.Button buttonServerTest; private System.Windows.Forms.TextBox textBoxServerPort; private System.Windows.Forms.TextBox textBoxServerAddr; - private System.Windows.Forms.RadioButton radioButtonFindServers; - private System.Windows.Forms.RadioButton radioButtonLocalServer; - private System.Windows.Forms.RadioButton radioButtonManual; - private System.Windows.Forms.Button buttonSearchForServers; private System.Windows.Forms.Panel panelPlayers; private System.Windows.Forms.Panel panelPlayer1; private System.Windows.Forms.Label labelPlayerCards0; @@ -800,7 +684,7 @@ namespace zsirozas private System.Windows.Forms.Label labelPlayerCards1; private System.Windows.Forms.Label labelPlayerName1; private System.Windows.Forms.Button buttonStartGame; - private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label labelBigRoom; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox textBoxIncomingPort; diff --git a/zsirozas/Form1.cs b/zsirozas/Form1.cs index 26ee81b2a275c9bb0d698fea24ecd889425baace..a5d9e54478724ff94d2ed7923e4eea85d92b82c0 100644 --- a/zsirozas/Form1.cs +++ b/zsirozas/Form1.cs @@ -1,11 +1,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace zsirozas @@ -94,31 +89,17 @@ namespace zsirozas } } - private void buttonStartLocalServer_Click(object sender, EventArgs e) - { - throw new NotImplementedException(); //Not in this version. - } - - private void buttonStopLocalServer_Click(object sender, EventArgs e) - { - throw new NotImplementedException(); //Not in this version. - } - - private void radioButtonManual_CheckedChanged(object sender, EventArgs e) - { - throw new NotImplementedException(); //Not in this version. - } - private void radioButtonFindServers_CheckedChanged(object sender, EventArgs e) - { - throw new NotImplementedException(); //Not in this version. - } - private void radioButtonLocalServer_CheckedChanged(object sender, EventArgs e) - { - throw new NotImplementedException(); //Not in this version. - } - private void buttonConnect_Click(object sender, EventArgs e) { + //Obtain address + string server_IP = textBoxServerAddr.Text; + int server_port = 0; + if (!int.TryParse(textBoxServerPort.Text, out server_port)) + { + MessageBox.Show("Halihó! Ez nem egy portszám."); + return; + } + //Obtain some preferences client.nickname = textBoxUserNickname.Text; if (!int.TryParse(textBoxIncomingPort.Text, out client.serverIncoming)) @@ -126,29 +107,6 @@ namespace zsirozas MessageBox.Show("Halihó! Ez sem egy portszám."); } - - string server_IP = null; - int server_port = 0; - - //obtain address from GUI - if (radioButtonManual.Checked) - { - server_IP = textBoxServerAddr.Text; - if (!int.TryParse(textBoxServerPort.Text, out server_port)) - { - MessageBox.Show("Halihó! Ez nem egy portszám."); - return; - } - } - else if (radioButtonLocalServer.Checked) - { - throw new NotImplementedException(); //Not in this version. - } - else if (radioButtonFindServers.Checked) - { - throw new NotImplementedException(); //Not in this version. - } - //connect if (client.Connect(server_IP, server_port)) { @@ -207,12 +165,13 @@ namespace zsirozas void RefreshServerInfo() { - if (client.remoteServer.ServerInfo().bigRoom && false) + if (client.remoteServer.ServerInfo().bigRoom) { - throw new NotImplementedException(); // todo kitalálni mit akartam ide + labelBigRoom.Visible = true; } else { + labelBigRoom.Visible = false; var rooms = client.remoteServer.ListRooms(); var roomInfos = new Dictionary<string, RoomInfo>(); listBoxRooms.Items.Clear(); @@ -229,9 +188,7 @@ namespace zsirozas listBoxUsers.Items.Add(userID); userInfos.Add(userID, client.remoteServer.UserInfo(userID)); } - //lock (listBoxUsers.Tag) lock (listBoxOwnRoom.Tag) //todo thread-safety? listBoxUsers.Tag = listBoxOwnRoom.Tag = userInfos; - //lock (listBoxRooms.Tag) listBoxRooms.Tag = roomInfos; //TODO: folytatni... } @@ -292,7 +249,6 @@ namespace zsirozas playerNameLabels[i].Visible = false; playerCardLabels[i].Visible = false; } - //MessageBox.Show(e.ToString()); if (client.gameState.nextUp==client.playerIDX) { MessageBox.Show(this,"Te jössz!"); @@ -317,7 +273,7 @@ namespace zsirozas } catch (Exception ex) { - MessageBox.Show("OOOOOOOOOOOOOOOOOOOOOO"); + MessageBox.Show("Itt valami szöszmötölés történt!"); System.Diagnostics.Debugger.Break(); throw ex; } @@ -466,7 +422,7 @@ namespace zsirozas private void buttonLogout_Click(object sender, EventArgs e) { - + //todo logout? } private void buttonRefreshServer_Click(object sender, EventArgs e) @@ -496,14 +452,12 @@ namespace zsirozas private void listBoxOwnRoom_MouseDoubleClick(object sender, MouseEventArgs e) { int idx = (sender as ListBox).IndexFromPoint(e.Location); - //todo akarom-e a klienst lock-olni? try { lock (client) if (idx != ListBox.NoMatches) { var info = client.remoteServer.UserInfo((sender as ListBox).Items[idx].ToString()); bool kickedOut = InfoDialog.ShowUserInfo(info, !info.occupied && info.roomID == null && info.userID != client.userID && client.roomID != null, "KickOut"); - //TODO: ki is rúgni if (kickedOut) { client.remoteServer.LeaveRoom(info.userID); diff --git a/zsirozas/Game.cs b/zsirozas/Game.cs index 0e6ba0f00fa346a40a232ebec4602aa102e5b17d..f761c0ca449ee396faefeb7dd48edd80d84bc9eb 100644 --- a/zsirozas/Game.cs +++ b/zsirozas/Game.cs @@ -189,13 +189,27 @@ namespace zsirozas { //winner starts a new round currentRound = new Round(currentRound.lastToHit, playersByOrder.Length); + //deal new cards for everyone int dealN = 4 - playersByID[playerID].cardsInHand.Count; var sdfsdff = deck.Deal(dealN, playersByOrder.Length); + + //int maxDealt = sdfsdff.Select((arg) => arg.Count).Max(); + for (int i = 0; i < playersByOrder.Length; i++) { int index = (currentRound.startingPlayer + i + 1) % playersByOrder.Length; playersByID[playersByOrder[index]].cardsInHand.AddRange(sdfsdff[i]); + + ////handle cases where [number of cards] % [number of players] != 0 + //if (sdfsdff[i].Count < maxDealt) + //{ + // currentRound.givenUpThisRound[index] = true; + // if (currentRound.startingPlayer == index) + // { + // currentRound.startingPlayer = (index + 1) % playersByOrder.Length; + // } + //} } //notify everyone NotifyPlayers(GameEvent.NewTurn); diff --git a/zsirozas/InfoDialog.Designer.cs b/zsirozas/InfoDialog.Designer.cs index 9506edf61e5850e3c9608edcdd84c5927d5678d7..180eac0bdc632fa38495c3f4677ea16761ec9c7e 100644 --- a/zsirozas/InfoDialog.Designer.cs +++ b/zsirozas/InfoDialog.Designer.cs @@ -1,142 +1,142 @@ -namespace zsirozas -{ - partial class InfoDialog - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.labelKey1 = new System.Windows.Forms.Label(); - this.labelValue1 = new System.Windows.Forms.Label(); - this.labelKey2 = new System.Windows.Forms.Label(); - this.labelValue2 = new System.Windows.Forms.Label(); - this.listBox1 = new System.Windows.Forms.ListBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // labelKey1 - // - this.labelKey1.AutoSize = true; - this.labelKey1.Location = new System.Drawing.Point(24, 13); - this.labelKey1.Name = "labelKey1"; - this.labelKey1.Size = new System.Drawing.Size(30, 13); - this.labelKey1.TabIndex = 0; - this.labelKey1.Text = "key1"; - // - // labelValue1 - // - this.labelValue1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelValue1.AutoSize = true; - this.labelValue1.Location = new System.Drawing.Point(180, 13); - this.labelValue1.Name = "labelValue1"; - this.labelValue1.Size = new System.Drawing.Size(39, 13); - this.labelValue1.TabIndex = 0; - this.labelValue1.Text = "value1"; - // - // labelKey2 - // - this.labelKey2.AutoSize = true; - this.labelKey2.Location = new System.Drawing.Point(24, 46); - this.labelKey2.Name = "labelKey2"; - this.labelKey2.Size = new System.Drawing.Size(30, 13); - this.labelKey2.TabIndex = 1; - this.labelKey2.Text = "key2"; - // - // labelValue2 - // - this.labelValue2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelValue2.AutoSize = true; - this.labelValue2.Location = new System.Drawing.Point(180, 46); - this.labelValue2.Name = "labelValue2"; - this.labelValue2.Size = new System.Drawing.Size(39, 13); - this.labelValue2.TabIndex = 0; - this.labelValue2.Text = "value2"; - // - // listBox1 - // - this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.listBox1.FormattingEnabled = true; - this.listBox1.Location = new System.Drawing.Point(27, 97); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(192, 160); - this.listBox1.TabIndex = 2; - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonOK.Location = new System.Drawing.Point(27, 286); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 23); - this.buttonOK.TabIndex = 3; - this.buttonOK.Text = "OK_button"; - this.buttonOK.UseVisualStyleBackColor = true; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(144, 286); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 23); - this.buttonCancel.TabIndex = 4; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // InfoDialog - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(250, 332); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.listBox1); - this.Controls.Add(this.labelKey2); - this.Controls.Add(this.labelValue2); - this.Controls.Add(this.labelValue1); - this.Controls.Add(this.labelKey1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "InfoDialog"; - this.Text = "InfoDialog"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label labelKey1; - private System.Windows.Forms.Label labelValue1; - private System.Windows.Forms.Label labelKey2; - private System.Windows.Forms.Label labelValue2; - private System.Windows.Forms.ListBox listBox1; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - } +namespace zsirozas +{ + partial class InfoDialog + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.labelKey1 = new System.Windows.Forms.Label(); + this.labelValue1 = new System.Windows.Forms.Label(); + this.labelKey2 = new System.Windows.Forms.Label(); + this.labelValue2 = new System.Windows.Forms.Label(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // labelKey1 + // + this.labelKey1.AutoSize = true; + this.labelKey1.Location = new System.Drawing.Point(24, 13); + this.labelKey1.Name = "labelKey1"; + this.labelKey1.Size = new System.Drawing.Size(30, 13); + this.labelKey1.TabIndex = 0; + this.labelKey1.Text = "key1"; + // + // labelValue1 + // + this.labelValue1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.labelValue1.AutoSize = true; + this.labelValue1.Location = new System.Drawing.Point(180, 13); + this.labelValue1.Name = "labelValue1"; + this.labelValue1.Size = new System.Drawing.Size(39, 13); + this.labelValue1.TabIndex = 0; + this.labelValue1.Text = "value1"; + // + // labelKey2 + // + this.labelKey2.AutoSize = true; + this.labelKey2.Location = new System.Drawing.Point(24, 46); + this.labelKey2.Name = "labelKey2"; + this.labelKey2.Size = new System.Drawing.Size(30, 13); + this.labelKey2.TabIndex = 1; + this.labelKey2.Text = "key2"; + // + // labelValue2 + // + this.labelValue2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.labelValue2.AutoSize = true; + this.labelValue2.Location = new System.Drawing.Point(180, 46); + this.labelValue2.Name = "labelValue2"; + this.labelValue2.Size = new System.Drawing.Size(39, 13); + this.labelValue2.TabIndex = 0; + this.labelValue2.Text = "value2"; + // + // listBox1 + // + this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(27, 97); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(192, 160); + this.listBox1.TabIndex = 2; + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonOK.Location = new System.Drawing.Point(27, 286); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(75, 23); + this.buttonOK.TabIndex = 3; + this.buttonOK.Text = "OK_button"; + this.buttonOK.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(144, 286); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(75, 23); + this.buttonCancel.TabIndex = 4; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // InfoDialog + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(250, 332); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.labelKey2); + this.Controls.Add(this.labelValue2); + this.Controls.Add(this.labelValue1); + this.Controls.Add(this.labelKey1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "InfoDialog"; + this.Text = "InfoDialog"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label labelKey1; + private System.Windows.Forms.Label labelValue1; + private System.Windows.Forms.Label labelKey2; + private System.Windows.Forms.Label labelValue2; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + } } \ No newline at end of file diff --git a/zsirozas/InfoDialog.resx b/zsirozas/InfoDialog.resx index 29dcb1b3a353ba227f65e11fbe3d6f0766e84292..1af7de150c99c12dd67a509fe57c10d63e4eeb04 100644 --- a/zsirozas/InfoDialog.resx +++ b/zsirozas/InfoDialog.resx @@ -1,120 +1,120 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> </root> \ No newline at end of file diff --git a/zsirozas/Program.cs b/zsirozas/Program.cs index 5e7cd25a558bc7fb37ce67d7a926709cb595853e..45c2948ad29d71d2d80d9e807aa5ef0956bac195 100644 --- a/zsirozas/Program.cs +++ b/zsirozas/Program.cs @@ -48,7 +48,8 @@ namespace zsirozas public bool WithConsole { get; set; } } - //TODO: BUG: játékindításkor összeakad a RoomChanged és a NewTurn kezelése + //TODO: BUG: játékindításkor néha összeakad a RoomChanged és a NewTurn kezelése + //TODO: BUG: játék végén elromlik a sorrend class MainClass { public static void Main(string[] args) @@ -69,7 +70,6 @@ namespace zsirozas else { var tcpParams = options.TcpConnectParams.ToArray(); - Console.WriteLine(string.Join(" ",tcpParams)); Application.Run(new Form1( tcpParams[0], tcpParams[1], tcpParams[2], options.Nickname )); } } diff --git a/zsirozas/app.config b/zsirozas/app.config index d40509835204c28996481b33fdbf3aee87bf3141..3dbff35f484e2710a41c17e8c0ac67ff80f48f35 100644 --- a/zsirozas/app.config +++ b/zsirozas/app.config @@ -1,3 +1,3 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> -<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration> +<?xml version="1.0" encoding="utf-8"?> +<configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration> diff --git a/zsirozas/zsirozas.csproj b/zsirozas/zsirozas.csproj index 307615ab029cc591f8748fce8348cb9f894085bd..adff421169bb278fed3913e3dab7cc1bff3d8b45 100644 --- a/zsirozas/zsirozas.csproj +++ b/zsirozas/zsirozas.csproj @@ -1,108 +1,108 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">x86</Platform> - <ProjectGuid>{6D2F04D2-0452-4934-BBC3-D6BBE565CF28}</ProjectGuid> - <OutputType>Exe</OutputType> - <RootNamespace>zsirozas</RootNamespace> - <AssemblyName>zsirozas</AssemblyName> - <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug</OutputPath> - <DefineConstants>DEBUG;</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ExternalConsole>true</ExternalConsole> - <PlatformTarget>x86</PlatformTarget> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> - <Optimize>true</Optimize> - <OutputPath>bin\Release</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ExternalConsole>true</ExternalConsole> - <PlatformTarget>x86</PlatformTarget> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Web.Extensions" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> - </Reference> - <Reference Include="Owin"> - <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath> - </Reference> - <Reference Include="Microsoft.Owin"> - <HintPath>..\packages\Microsoft.Owin.4.1.0\lib\net45\Microsoft.Owin.dll</HintPath> - </Reference> - <Reference Include="Microsoft.Owin.Security"> - <HintPath>..\packages\Microsoft.Owin.Security.4.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath> - </Reference> - <Reference Include="Microsoft.AspNet.SignalR.Core"> - <HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.4.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath> - </Reference> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Security" /> - <Reference Include="Microsoft.AspNet.SignalR.Client"> - <HintPath>..\packages\Microsoft.AspNet.SignalR.Client.2.4.1\lib\net45\Microsoft.AspNet.SignalR.Client.dll</HintPath> - </Reference> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Net.Http.WebRequest" /> - <Reference Include="Microsoft.Owin.Hosting"> - <HintPath>..\packages\Microsoft.Owin.Hosting.4.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath> - </Reference> - <Reference Include="CommandLine"> - <HintPath>..\packages\CommandLineParser.2.8.0\lib\net461\CommandLine.dll</HintPath> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Form1.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Form1.Designer.cs"> - <DependentUpon>Form1.cs</DependentUpon> - </Compile> - <Compile Include="InfoDialog.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="InfoDialog.Designer.cs"> - <DependentUpon>InfoDialog.cs</DependentUpon> - </Compile> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Deck.cs" /> - <Compile Include="Round.cs" /> - <Compile Include="Game.cs" /> - <Compile Include="GameServer.cs" /> - <Compile Include="GameClient.cs" /> - <Compile Include="ServerWrapper.cs" /> - <Compile Include="Common.cs" /> - <Compile Include="RawTcpTransport.cs" /> - <Compile Include="Rooms.cs" /> - <Compile Include="SignalR-Transport.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="app.config" /> - <None Include="ClassDiagram1.cd" /> - <None Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Form1.resx"> - <DependentUpon>Form1.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="InfoDialog.resx"> - <DependentUpon>InfoDialog.cs</DependentUpon> - </EmbeddedResource> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProjectGuid>{6D2F04D2-0452-4934-BBC3-D6BBE565CF28}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>zsirozas</RootNamespace> + <AssemblyName>zsirozas</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ExternalConsole>true</ExternalConsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ExternalConsole>true</ExternalConsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Web.Extensions" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="Owin"> + <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Owin"> + <HintPath>..\packages\Microsoft.Owin.4.1.0\lib\net45\Microsoft.Owin.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Owin.Security"> + <HintPath>..\packages\Microsoft.Owin.Security.4.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath> + </Reference> + <Reference Include="Microsoft.AspNet.SignalR.Core"> + <HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.4.1\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Security" /> + <Reference Include="Microsoft.AspNet.SignalR.Client"> + <HintPath>..\packages\Microsoft.AspNet.SignalR.Client.2.4.1\lib\net45\Microsoft.AspNet.SignalR.Client.dll</HintPath> + </Reference> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Net.Http.WebRequest" /> + <Reference Include="Microsoft.Owin.Hosting"> + <HintPath>..\packages\Microsoft.Owin.Hosting.4.1.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath> + </Reference> + <Reference Include="CommandLine"> + <HintPath>..\packages\CommandLineParser.2.8.0\lib\net461\CommandLine.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="InfoDialog.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="InfoDialog.Designer.cs"> + <DependentUpon>InfoDialog.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Deck.cs" /> + <Compile Include="Round.cs" /> + <Compile Include="Game.cs" /> + <Compile Include="GameServer.cs" /> + <Compile Include="GameClient.cs" /> + <Compile Include="ServerWrapper.cs" /> + <Compile Include="Common.cs" /> + <Compile Include="RawTcpTransport.cs" /> + <Compile Include="Rooms.cs" /> + <Compile Include="SignalR-Transport.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + <None Include="ClassDiagram1.cd" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Form1.resx"> + <DependentUpon>Form1.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="InfoDialog.resx"> + <DependentUpon>InfoDialog.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file