This commit is contained in:
2022-04-09 16:38:03 +02:00
parent 5383214097
commit b5b7a18180
19 changed files with 90 additions and 4 deletions

Binary file not shown.

View File

@@ -8,13 +8,19 @@ EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|Any CPU.Build.0 = Debug|Any CPU {D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|x64.ActiveCfg = Debug|x64
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Debug|x64.Build.0 = Debug|x64
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|Any CPU.ActiveCfg = Release|Any CPU {D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|Any CPU.Build.0 = Release|Any CPU {D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|Any CPU.Build.0 = Release|Any CPU
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|x64.ActiveCfg = Release|x64
{D58A69DD-68B9-4280-8DDD-57B73B4EAC21}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -24,16 +24,57 @@ namespace Sakk {
return true; //ha nem talalt sehol se babut akkor return true return true; //ha nem talalt sehol se babut akkor return true
} }
static void Main(string[] args) { public static void kiir() {
int lehetosegek = 0;
for (int i = 0; i < tabla.GetLength(0); i++) { for (int i = 0; i < tabla.GetLength(0); i++) {
for (int j = 0; j < tabla.GetLength(1); j++) { for (int j = 0; j < tabla.GetLength(1); j++) {
Console.Write(tabla[i,j] + " ");
} }
Console.WriteLine();
}
}
static void Main(string[] args) {
//problema ha el van tolva a sor vagy az oszlop nem rak le 8 babut
//csak egy fajta variaciot tud megcsinalni
Random random = new Random();
List<int[,]> tablak = new List<int[,]>();
//int lehetosegek = 0;
int babuk = 0;
int akt_sor = 0;
bool nem_jo_ketszer = false;
int elozo_poz = 0, elozo_sor = 0;
while(babuk < 9) {
int pozicio = random.Next(0, 7);
Console.WriteLine("pozicio: " + pozicio);
Console.WriteLine("akt sor:" + akt_sor);
if(sorEllenorzes(akt_sor) && oszlopEllenorzes(pozicio)) {
tabla[akt_sor, pozicio] = 1;
elozo_poz = pozicio; //elozo babu elmentese
elozo_sor = akt_sor;
babuk++;
akt_sor++;
}
if(elozo_sor == akt_sor) {
nem_jo_ketszer = true;
if (nem_jo_ketszer) {
tabla = new int[8, 8];
babuk = 0,
}
}
//atnezni van e mar ez a tabla eltarolva
if(babuk == 8) {
tablak.Add(tabla);
}
kiir();
} }
Console.ReadKey(); Console.ReadKey();
} }
} }

View File

@@ -32,6 +32,26 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />

Binary file not shown.

Binary file not shown.

BIN
Sakk/bin/x64/Debug/Sakk.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

BIN
Sakk/bin/x64/Debug/Sakk.pdb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

Binary file not shown.

View File

@@ -0,0 +1 @@
a716bfef2e809d656a083b5be6f3dfe2908c1bec

View File

@@ -0,0 +1,8 @@
C:\dev\c#\Sakk\Sakk\bin\x64\Debug\Sakk.exe.config
C:\dev\c#\Sakk\Sakk\bin\x64\Debug\Sakk.exe
C:\dev\c#\Sakk\Sakk\bin\x64\Debug\Sakk.pdb
C:\dev\c#\Sakk\Sakk\obj\x64\Debug\Sakk.csproj.AssemblyReference.cache
C:\dev\c#\Sakk\Sakk\obj\x64\Debug\Sakk.csproj.SuggestedBindingRedirects.cache
C:\dev\c#\Sakk\Sakk\obj\x64\Debug\Sakk.csproj.CoreCompileInputs.cache
C:\dev\c#\Sakk\Sakk\obj\x64\Debug\Sakk.exe
C:\dev\c#\Sakk\Sakk\obj\x64\Debug\Sakk.pdb

BIN
Sakk/obj/x64/Debug/Sakk.exe Normal file

Binary file not shown.

BIN
Sakk/obj/x64/Debug/Sakk.pdb Normal file

Binary file not shown.