update
This commit is contained in:
Binary file not shown.
6
Sakk.sln
6
Sakk.sln
@@ -8,13 +8,19 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{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|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.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
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -24,15 +24,56 @@ namespace Sakk {
|
||||
return true; //ha nem talalt sehol se babut akkor return true
|
||||
}
|
||||
|
||||
static void Main(string[] args) {
|
||||
int lehetosegek = 0;
|
||||
|
||||
public static void kiir() {
|
||||
for (int i = 0; i < tabla.GetLength(0); i++) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,26 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</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>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Sakk/bin/x64/Debug/Sakk.exe
Normal file
BIN
Sakk/bin/x64/Debug/Sakk.exe
Normal file
Binary file not shown.
6
Sakk/bin/x64/Debug/Sakk.exe.config
Normal file
6
Sakk/bin/x64/Debug/Sakk.exe.config
Normal 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
BIN
Sakk/bin/x64/Debug/Sakk.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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.
BIN
Sakk/obj/x64/Debug/Sakk.csproj.AssemblyReference.cache
Normal file
BIN
Sakk/obj/x64/Debug/Sakk.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
1
Sakk/obj/x64/Debug/Sakk.csproj.CoreCompileInputs.cache
Normal file
1
Sakk/obj/x64/Debug/Sakk.csproj.CoreCompileInputs.cache
Normal file
@@ -0,0 +1 @@
|
||||
a716bfef2e809d656a083b5be6f3dfe2908c1bec
|
||||
8
Sakk/obj/x64/Debug/Sakk.csproj.FileListAbsolute.txt
Normal file
8
Sakk/obj/x64/Debug/Sakk.csproj.FileListAbsolute.txt
Normal 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
BIN
Sakk/obj/x64/Debug/Sakk.exe
Normal file
Binary file not shown.
BIN
Sakk/obj/x64/Debug/Sakk.pdb
Normal file
BIN
Sakk/obj/x64/Debug/Sakk.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user