This commit is contained in:
2022-09-23 11:39:57 +02:00
parent 5db07cafb8
commit 7f29cd32c8
16 changed files with 14 additions and 2 deletions

Binary file not shown.

View File

@@ -48,7 +48,7 @@ namespace Tic_Tac_Toe {
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
System.Console.WriteLine("TEST KIIRAS");
// TODO: Add your update logic here
if (playerWon == 0) {
@@ -60,12 +60,14 @@ namespace Tic_Tac_Toe {
if (rectArray[i, j].Contains(new Point(mouse.X, mouse.Y)) && mouse.LeftButton == ButtonState.Pressed && CircleXPostion[i, j] == 0) {
CircleXPostion[i, j] = 1; //eltároljuk a kör pozicióját
isCircleNext = false;
printGameStateArray();
//System.Threading.Thread.Sleep(250);
}
} else {
if (rectArray[i, j].Contains(new Point(mouse.X, mouse.Y)) && mouse.LeftButton == ButtonState.Pressed && CircleXPostion[i, j] == 0) {
CircleXPostion[i, j] = 2; //eltaroljuk az x poziciojat
isCircleNext = true;
printGameStateArray();
//System.Threading.Thread.Sleep(250);
}
}
@@ -149,6 +151,16 @@ namespace Tic_Tac_Toe {
_spriteBatch.DrawRectangle(rectArray[indexX, indexY], color, lineThickness, 0);
}
private void printGameStateArray() {
for (int i = 0; i < CircleXPostion.GetLength(0); i++) {
for (int j = 0; j < CircleXPostion.GetLength(1); j++) {
System.Console.Write(CircleXPostion[i,j] + " | ");
}
System.Console.WriteLine();
}
System.Console.WriteLine("\n\n");
}
private void CheckGameCondition() {
//vertical
//circle

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RollForward>Major</RollForward>
<PublishReadyToRun>false</PublishReadyToRun>