diff --git a/OsztoProgram.sln b/OsztoProgram.sln new file mode 100644 index 0000000..5eb6f56 --- /dev/null +++ b/OsztoProgram.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35931.197 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OsztoProgram", "OsztoProgram\OsztoProgram.csproj", "{253C0C07-B03C-437F-8640-F8C361D0218C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {253C0C07-B03C-437F-8640-F8C361D0218C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {253C0C07-B03C-437F-8640-F8C361D0218C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {253C0C07-B03C-437F-8640-F8C361D0218C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {253C0C07-B03C-437F-8640-F8C361D0218C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BA2E0E8D-8ACB-4E60-99FC-03D4A75A0999} + EndGlobalSection +EndGlobal diff --git a/OsztoProgram/App.config b/OsztoProgram/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/OsztoProgram/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OsztoProgram/Csomag.cs b/OsztoProgram/Csomag.cs new file mode 100644 index 0000000..146282d --- /dev/null +++ b/OsztoProgram/Csomag.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OsztoProgram +{ + internal class Csomag + { + public Kartyalap[] Lapok; + public Csomag() + { + Lapok = new Kartyalap[52]; + //kártyalapok létrehozása: + string[] szinek = { "pikk", "kőr", "káró", "treff" }; + string[] ertekek = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A" }; + int lapindex = 0; + foreach (string szin in szinek) + { + foreach (string ertek in ertekek) + { + Lapok[lapindex] = new Kartyalap(szin, ertek); + lapindex++; + } + } + } + } +} diff --git a/OsztoProgram/Jatekos.cs b/OsztoProgram/Jatekos.cs new file mode 100644 index 0000000..8d162c2 --- /dev/null +++ b/OsztoProgram/Jatekos.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OsztoProgram +{ + internal class Jatekos + { + public Kartyalap[] Lapok; + public string Nev; + public Jatekos(string Nev) + { + this.Nev = Nev; + } + } +} diff --git a/OsztoProgram/Kartyalap.cs b/OsztoProgram/Kartyalap.cs new file mode 100644 index 0000000..419dd48 --- /dev/null +++ b/OsztoProgram/Kartyalap.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OsztoProgram +{ + internal class Kartyalap + { + public string Szin; + public string Ertek; + + public Kartyalap(string Szin, string Ertek) + { + this.Szin=Szin; + this.Ertek=Ertek; + } + + } +} diff --git a/OsztoProgram/Oszto.cs b/OsztoProgram/Oszto.cs new file mode 100644 index 0000000..4fb35eb --- /dev/null +++ b/OsztoProgram/Oszto.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OsztoProgram +{ + internal class Oszto + { + public Csomag Pakli; + public Jatekos[] Jatekosok; + public int Osztottlapok; //egy játékosnak hány lapot kell adni + public int JatekosokSzama; + public int Hanyasaval; //hanyasával kell a lapokat kiosztani + static void Main(string[] args) + { + /*Csomag cs = new Csomag(); + Console.WriteLine(cs.Lapok[0].Szin+" - " + cs.Lapok[0].Ertek); + Console.WriteLine(cs.Lapok[25].Szin+" - " + cs.Lapok[25].Ertek); + Console.WriteLine(cs.Lapok[51].Szin+" - " + cs.Lapok[51].Ertek);*/ + + Oszto osztoprogram = new Oszto(); + osztoprogram.Bekeres(); + } + + public Oszto() + { + Pakli = new Csomag(); + + } + + public void Bekeres () + { + Console.WriteLine("Hány játékosnak osszak? (1-4)"); + JatekosokSzama = int.Parse(Console.ReadLine()); + Console.WriteLine("Hány lapot kapjon egy-egy játékos?"); + Osztottlapok = int.Parse(Console.ReadLine()); + Console.WriteLine("Hanyasával osszam a lapokat?"); + Hanyasaval = int.Parse(Console.ReadLine()); + } + } +} diff --git a/OsztoProgram/OsztoProgram.csproj b/OsztoProgram/OsztoProgram.csproj new file mode 100644 index 0000000..e821c91 --- /dev/null +++ b/OsztoProgram/OsztoProgram.csproj @@ -0,0 +1,56 @@ + + + + + Debug + AnyCPU + {253C0C07-B03C-437F-8640-F8C361D0218C} + Exe + OsztoProgram + OsztoProgram + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsztoProgram/Properties/AssemblyInfo.cs b/OsztoProgram/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b895cda --- /dev/null +++ b/OsztoProgram/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OsztoProgram")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OsztoProgram")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("253c0c07-b03c-437f-8640-f8c361d0218c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]