reverse diagonal working
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Tic_Tac_Toe {
|
||||
private List<string> X4PosList;
|
||||
private int lineThickness = 5;
|
||||
private int playerWon = 0; //1 is circle 2 is x
|
||||
private bool isCircleNext = true; //basically start player here
|
||||
private bool isCircleNext = false; //basically start player here
|
||||
|
||||
public Game1() {
|
||||
_graphics = new GraphicsDeviceManager(this);
|
||||
@@ -294,6 +294,15 @@ namespace Tic_Tac_Toe {
|
||||
}
|
||||
|
||||
//reverse diagonal
|
||||
//circle
|
||||
if (CircleXPostion[0,2] == 1 && CircleXPostion[1,1] == 1 && CircleXPostion[2,0] == 1) {
|
||||
playerWon = 1;
|
||||
return;
|
||||
}else if(CircleXPostion[0, 2] == 2 && CircleXPostion[1, 1] == 2 && CircleXPostion[2, 0] == 2) {
|
||||
playerWon = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RollForward>Major</RollForward>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
@@ -8,12 +8,15 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
<ApplicationIcon>tic-tac-toe.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Icon.ico" />
|
||||
<None Remove="Icon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="tic-tac-toe.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
<EmbeddedResource Include="Icon.bmp" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/Content/Textures/X.xnb
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Content/Textures/X.xnb
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/Content/Textures/circle.xnb
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Content/Textures/circle.xnb
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/MonoGame.Extended.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/MonoGame.Extended.dll
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/MonoGame.Framework.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/MonoGame.Framework.dll
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/Newtonsoft.Json.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Newtonsoft.Json.dll
Normal file
Binary file not shown.
126
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.deps.json
Normal file
126
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.deps.json
Normal file
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"Tic-Tac-Toe/1.0.0": {
|
||||
"dependencies": {
|
||||
"MonoGame.Content.Builder.Task": "3.8.1.303",
|
||||
"MonoGame.Extended": "3.8.0",
|
||||
"MonoGame.Framework.DesktopGL": "3.8.1.303"
|
||||
},
|
||||
"runtime": {
|
||||
"Tic-Tac-Toe.dll": {}
|
||||
}
|
||||
},
|
||||
"MonoGame.Content.Builder.Task/3.8.1.303": {},
|
||||
"MonoGame.Extended/3.8.0": {
|
||||
"dependencies": {
|
||||
"Newtonsoft.Json": "12.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/MonoGame.Extended.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MonoGame.Framework.DesktopGL/3.8.1.303": {
|
||||
"runtime": {
|
||||
"lib/net6.0/MonoGame.Framework.dll": {
|
||||
"assemblyVersion": "3.8.1.303",
|
||||
"fileVersion": "3.8.1.303"
|
||||
}
|
||||
},
|
||||
"runtimeTargets": {
|
||||
"runtimes/linux-x64/native/libSDL2-2.0.so.0": {
|
||||
"rid": "linux-x64",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
},
|
||||
"runtimes/linux-x64/native/libopenal.so.1": {
|
||||
"rid": "linux-x64",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
},
|
||||
"runtimes/osx/native/libSDL2.dylib": {
|
||||
"rid": "osx",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
},
|
||||
"runtimes/osx/native/libopenal.1.dylib": {
|
||||
"rid": "osx",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
},
|
||||
"runtimes/win-x64/native/SDL2.dll": {
|
||||
"rid": "win-x64",
|
||||
"assetType": "native",
|
||||
"fileVersion": "2.0.20.0"
|
||||
},
|
||||
"runtimes/win-x64/native/soft_oal.dll": {
|
||||
"rid": "win-x64",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
},
|
||||
"runtimes/win-x86/native/SDL2.dll": {
|
||||
"rid": "win-x86",
|
||||
"assetType": "native",
|
||||
"fileVersion": "2.0.20.0"
|
||||
},
|
||||
"runtimes/win-x86/native/soft_oal.dll": {
|
||||
"rid": "win-x86",
|
||||
"assetType": "native",
|
||||
"fileVersion": "0.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Newtonsoft.Json/12.0.3": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Newtonsoft.Json.dll": {
|
||||
"assemblyVersion": "12.0.0.0",
|
||||
"fileVersion": "12.0.3.23909"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Tic-Tac-Toe/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"MonoGame.Content.Builder.Task/3.8.1.303": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-9Ilzzje62LhWElbPNEl7vh7XsRSbze+lvCJdZtTZUGu48FRgvYN6THURwIB9PN98EI33/Wnf6iuShNUtD7hL4Q==",
|
||||
"path": "monogame.content.builder.task/3.8.1.303",
|
||||
"hashPath": "monogame.content.builder.task.3.8.1.303.nupkg.sha512"
|
||||
},
|
||||
"MonoGame.Extended/3.8.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-FDPoUOFtslGNHCWSqjKD0C67RYN6Stb6NWnn+rkCmtkPBZlE6LvwuGyQBkHUkAMANO3LzO/Wsz9etMhwZLInqg==",
|
||||
"path": "monogame.extended/3.8.0",
|
||||
"hashPath": "monogame.extended.3.8.0.nupkg.sha512"
|
||||
},
|
||||
"MonoGame.Framework.DesktopGL/3.8.1.303": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-eGYhqn0n1olk8MNYeE9EuBmoNNECN1T18rPMaQpkzsEQ0H3nVyFPXC+uCo78v5pi5juQpJ3PSFnSkjzZJ1U58A==",
|
||||
"path": "monogame.framework.desktopgl/3.8.1.303",
|
||||
"hashPath": "monogame.framework.desktopgl.3.8.1.303.nupkg.sha512"
|
||||
},
|
||||
"Newtonsoft.Json/12.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg==",
|
||||
"path": "newtonsoft.json/12.0.3",
|
||||
"hashPath": "newtonsoft.json.12.0.3.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.dll
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.exe
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.exe
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.pdb
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/Tic-Tac-Toe.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"rollForward": "Major",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||
"System.Runtime.TieredCompilation": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/osx/native/libSDL2.dylib
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/osx/native/libSDL2.dylib
Normal file
Binary file not shown.
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/win-x64/native/SDL2.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/win-x64/native/SDL2.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/win-x86/native/SDL2.dll
Normal file
BIN
Tic-Tac-Toe/bin/Release/net6.0/runtimes/win-x86/native/SDL2.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,7 +27,9 @@ C:\dev\Tic-Tac-Toe\Tic-Tac-Toe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\cir
|
||||
C:\dev\Tic-Tac-Toe\Tic-Tac-Toe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\X.xnb
|
||||
C:\dev\Tic-Tac-Toe\Tic-Tac-Toe\Tic-Tac-Toe\bin\Debug\net6.0\MonoGame.Extended.dll
|
||||
C:\dev\Tic-Tac-Toe\Tic-Tac-Toe\Tic-Tac-Toe\bin\Debug\net6.0\Newtonsoft.Json.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\Circle win text.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\circle.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\Cross win text.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\X.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Tic-Tac-Toe.exe
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Tic-Tac-Toe.deps.json
|
||||
@@ -56,5 +58,3 @@ C:\dev\TicTacToe\Tic-Tac-Toe\obj\Debug\net6.0\refint\Tic-Tac-Toe.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Debug\net6.0\Tic-Tac-Toe.pdb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Debug\net6.0\Tic-Tac-Toe.genruntimeconfig.cache
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Debug\net6.0\ref\Tic-Tac-Toe.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\Circle win text.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Debug\net6.0\Content\Textures\Cross win text.xnb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
|
||||
23
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.AssemblyInfo.cs
Normal file
23
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.AssemblyInfo.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Tic-Tac-Toe")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Tic-Tac-Toe")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Tic-Tac-Toe")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
4df3e5c86fd5162c528007d1757bc46d9c89350c
|
||||
@@ -0,0 +1,10 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Tic-Tac-Toe
|
||||
build_property.ProjectDir = C:\dev\TicTacToe\Tic-Tac-Toe\
|
||||
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.assets.cache
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.assets.cache
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
fb1d74c3fec8728dd67e5c62ca0becfea65b0892
|
||||
@@ -0,0 +1,31 @@
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Content\Textures\Circle win text.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Content\Textures\circle.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Content\Textures\Cross win text.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Content\Textures\X.xnb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Tic-Tac-Toe.exe
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Tic-Tac-Toe.deps.json
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Tic-Tac-Toe.runtimeconfig.json
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Tic-Tac-Toe.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Tic-Tac-Toe.pdb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\MonoGame.Extended.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\MonoGame.Framework.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\Newtonsoft.Json.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\linux-x64\native\libSDL2-2.0.so.0
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\linux-x64\native\libopenal.so.1
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\osx\native\libSDL2.dylib
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\osx\native\libopenal.1.dylib
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\win-x64\native\SDL2.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\win-x64\native\soft_oal.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\win-x86\native\SDL2.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\bin\Release\net6.0\runtimes\win-x86\native\soft_oal.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.csproj.AssemblyReference.cache
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.AssemblyInfoInputs.cache
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.AssemblyInfo.cs
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.csproj.CoreCompileInputs.cache
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.csproj.CopyComplete
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\refint\Tic-Tac-Toe.dll
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.pdb
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\Tic-Tac-Toe.genruntimeconfig.cache
|
||||
C:\dev\TicTacToe\Tic-Tac-Toe\obj\Release\net6.0\ref\Tic-Tac-Toe.dll
|
||||
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.dll
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.dll
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
63cd2f64283bd50c08a48ed09a9111e25db51877
|
||||
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.pdb
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/Tic-Tac-Toe.pdb
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/obj/Release/net6.0/apphost.exe
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/apphost.exe
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/obj/Release/net6.0/ref/Tic-Tac-Toe.dll
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/ref/Tic-Tac-Toe.dll
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/obj/Release/net6.0/refint/Tic-Tac-Toe.dll
Normal file
BIN
Tic-Tac-Toe/obj/Release/net6.0/refint/Tic-Tac-Toe.dll
Normal file
Binary file not shown.
BIN
Tic-Tac-Toe/tic-tac-toe.ico
Normal file
BIN
Tic-Tac-Toe/tic-tac-toe.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
Tic-Tac-Toe/tic-tac-toe.png
Normal file
BIN
Tic-Tac-Toe/tic-tac-toe.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user