player won texture added

This commit is contained in:
2022-09-26 15:42:35 +02:00
parent e44633918d
commit a4c1366444
30 changed files with 58 additions and 14 deletions

Binary file not shown.

View File

@@ -13,6 +13,18 @@
#---------------------------------- Content ---------------------------------# #---------------------------------- Content ---------------------------------#
#begin Textures/Circle win text.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/Circle win text.png
#begin Textures/circle.png #begin Textures/circle.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor
@@ -25,6 +37,18 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:Textures/circle.png /build:Textures/circle.png
#begin Textures/Cross win text.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:Textures/Cross win text.png
#begin Textures/X.png #begin Textures/X.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><SourceFileCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Profile>Reach</Profile><Platform>DesktopGL</Platform><Config /><SourceFiles><File>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/circle.png</File><File>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/X.png</File></SourceFiles><DestFiles><File xsi:nil="true" /><File xsi:nil="true" /></DestFiles></SourceFileCollection> <?xml version="1.0" encoding="utf-8"?><SourceFileCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Profile>Reach</Profile><Platform>DesktopGL</Platform><Config /><SourceFiles><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Circle win text.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/circle.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Cross win text.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/X.png</File></SourceFiles><DestFiles><File xsi:nil="true" /><File xsi:nil="true" /><File xsi:nil="true" /><File xsi:nil="true" /></DestFiles></SourceFileCollection>

View File

@@ -1,3 +1,5 @@
Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Size,Build Seconds
"C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/circle.png","C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/circle.xnb","TextureProcessor","Texture2DContent",6638,1354981,0,2338499 "C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Circle win text.png","C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/Circle win text.xnb","TextureProcessor","Texture2DContent",1751,140085,0,1433646
"C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/X.png","C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/X.xnb","TextureProcessor","Texture2DContent",6565,3841685,0,0947381 "C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/circle.png","C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/circle.xnb","TextureProcessor","Texture2DContent",6638,1354981,0,0303196
"C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Cross win text.png","C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/Cross win text.xnb","TextureProcessor","Texture2DContent",1739,140085,0,0061203
"C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/X.png","C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/X.xnb","TextureProcessor","Texture2DContent",6565,3841685,0,0896875

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Circle win text.png</SourceFile><SourceTime>2022-09-26T15:06:08.497843+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/Circle win text.xnb</DestFile><DestTime>2022-09-26T15:11:36.1518332+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Cross win text.png</SourceFile><SourceTime>2022-09-26T15:09:34.348482+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/Cross win text.xnb</DestFile><DestTime>2022-09-26T15:11:36.2058347+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/X.png</SourceFile><SourceTime>2022-09-21T09:28:35.420606+02:00</SourceTime><DestFile>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/X.xnb</DestFile><DestTime>2022-09-21T09:37:35.0942448+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent> <?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/X.png</SourceFile><SourceTime>2022-09-21T13:10:39.0278565+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/X.xnb</DestFile><DestTime>2022-09-26T15:11:36.2998336+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/Textures/circle.png</SourceFile><SourceTime>2022-09-21T09:27:30.8441469+02:00</SourceTime><DestFile>C:/dev/Tic-Tac-Toe/Tic-Tac-Toe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/circle.xnb</DestFile><DestTime>2022-09-21T09:37:34.9863545+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent> <?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/circle.png</SourceFile><SourceTime>2022-09-21T13:10:39.0288563+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Textures/circle.xnb</DestFile><DestTime>2022-09-26T15:11:36.1988339+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><SourceFileCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Profile>Reach</Profile><Platform>DesktopGL</Platform><Config /><SourceFiles><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/circle.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/X.png</File></SourceFiles><DestFiles><File xsi:nil="true" /><File xsi:nil="true" /></DestFiles></SourceFileCollection> <?xml version="1.0" encoding="utf-8"?><SourceFileCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Profile>Reach</Profile><Platform>DesktopGL</Platform><Config /><SourceFiles><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Circle win text.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/circle.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Cross win text.png</File><File>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/X.png</File></SourceFiles><DestFiles><File xsi:nil="true" /><File xsi:nil="true" /><File xsi:nil="true" /><File xsi:nil="true" /></DestFiles></SourceFileCollection>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Circle win text.png</SourceFile><SourceTime>2022-09-26T15:06:08.497843+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Content/Textures/Circle win text.xnb</DestFile><DestTime>2022-09-26T15:24:02.9022091+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><PipelineBuildEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SourceFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/Textures/Cross win text.png</SourceFile><SourceTime>2022-09-26T15:09:34.348482+02:00</SourceTime><DestFile>C:/dev/TicTacToe/Tic-Tac-Toe/Content/bin/DesktopGL/Content/Textures/Cross win text.xnb</DestFile><DestTime>2022-09-26T15:24:02.9232111+02:00</DestTime><Importer>TextureImporter</Importer><ImporterTime>2022-07-26T13:44:56+02:00</ImporterTime><Processor>TextureProcessor</Processor><ProcessorTime>2022-07-26T13:44:56+02:00</ProcessorTime><Parameters><Key>ColorKeyColor</Key><Value>255,0,255,255</Value></Parameters><Parameters><Key>ColorKeyEnabled</Key><Value>True</Value></Parameters><Parameters><Key>GenerateMipmaps</Key><Value>False</Value></Parameters><Parameters><Key>PremultiplyAlpha</Key><Value>True</Value></Parameters><Parameters><Key>ResizeToPowerOfTwo</Key><Value>False</Value></Parameters><Parameters><Key>MakeSquare</Key><Value>False</Value></Parameters><Parameters><Key>TextureFormat</Key><Value>Color</Value></Parameters><Dependencies /><BuildAsset /><BuildOutput /></PipelineBuildEvent>

View File

@@ -2,14 +2,18 @@
using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using MonoGame.Extended; using MonoGame.Extended;
using System.Collections.Generic;
namespace Tic_Tac_Toe { namespace Tic_Tac_Toe {
public class Game1 : Game { public class Game1 : Game {
private GraphicsDeviceManager _graphics; private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch; private SpriteBatch _spriteBatch;
private Texture2D Circle, X; private Texture2D Circle, X;
private Texture2D CircleWonTexture, XWonTexture;
private RectangleF[,] rectArray; private RectangleF[,] rectArray;
private int[,] CircleXPostion; private int[,] CircleXPostion;
private List<string> Circle4PosList; //for storing the 4 latest positions
private List<string> X4PosList;
private int lineThickness = 5; private int lineThickness = 5;
private int playerWon = 0; //1 is circle 2 is x private int playerWon = 0; //1 is circle 2 is x
private bool isCircleNext = false; private bool isCircleNext = false;
@@ -21,8 +25,6 @@ namespace Tic_Tac_Toe {
} }
protected override void Initialize() { protected override void Initialize() {
// TODO: Add your initialization logic here
//Setting Resolution //Setting Resolution
_graphics.PreferredBackBufferWidth = 800; _graphics.PreferredBackBufferWidth = 800;
_graphics.PreferredBackBufferHeight = 600; _graphics.PreferredBackBufferHeight = 600;
@@ -32,23 +34,23 @@ namespace Tic_Tac_Toe {
rectArray = new RectangleF[3,3]; rectArray = new RectangleF[3,3];
CircleXPostion = new int[3, 3]; //0 is free space, 1 is circle, 2 is X CircleXPostion = new int[3, 3]; //0 is free space, 1 is circle, 2 is X
Circle4PosList = new List<string>();
X4PosList = new List<string>();
base.Initialize(); base.Initialize();
} }
protected override void LoadContent() { protected override void LoadContent() {
_spriteBatch = new SpriteBatch(GraphicsDevice); _spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
Circle = Content.Load<Texture2D>("Textures/circle"); Circle = Content.Load<Texture2D>("Textures/circle");
X = Content.Load<Texture2D>("Textures/X"); X = Content.Load<Texture2D>("Textures/X");
CircleWonTexture = Content.Load<Texture2D>("Textures/Circle win text");
XWonTexture = Content.Load<Texture2D>("Textures/Cross win text");
} }
protected override void Update(GameTime gameTime) { protected override void Update(GameTime gameTime) {
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
if (playerWon == 0) { if (playerWon == 0) {
var mouse = Mouse.GetState(); var mouse = Mouse.GetState();
for (int i = 0; i < rectArray.GetLength(0); i++) { for (int i = 0; i < rectArray.GetLength(0); i++) {
@@ -59,6 +61,7 @@ namespace Tic_Tac_Toe {
CircleXPostion[j, i] = 1; //eltároljuk a kör pozicióját ||| CHANGED FROM [i,j] CircleXPostion[j, i] = 1; //eltároljuk a kör pozicióját ||| CHANGED FROM [i,j]
isCircleNext = false; isCircleNext = false;
printGameStateArray(); printGameStateArray();
//Put list stuff here
//System.Threading.Thread.Sleep(250); //System.Threading.Thread.Sleep(250);
} }
} else { } else {
@@ -66,6 +69,7 @@ namespace Tic_Tac_Toe {
CircleXPostion[j, i] = 2; //eltaroljuk az x poziciojat CircleXPostion[j, i] = 2; //eltaroljuk az x poziciojat
isCircleNext = true; isCircleNext = true;
printGameStateArray(); printGameStateArray();
//Put list stuff here
//System.Threading.Thread.Sleep(250); //System.Threading.Thread.Sleep(250);
} }
} }
@@ -81,9 +85,16 @@ namespace Tic_Tac_Toe {
protected override void Draw(GameTime gameTime) { protected override void Draw(GameTime gameTime) {
GraphicsDevice.Clear(Color.CadetBlue); GraphicsDevice.Clear(Color.CadetBlue);
// TODO: Add your drawing code here
var mouse = Mouse.GetState(); var mouse = Mouse.GetState();
_spriteBatch.Begin(); _spriteBatch.Begin();
if(playerWon == 1) {
_spriteBatch.Draw(CircleWonTexture, new Rectangle(10, 0, 50, 600), Color.White);
_spriteBatch.Draw(CircleWonTexture, new Rectangle(_graphics.PreferredBackBufferWidth - 75, 0, 50, 600), Color.White);
}else if(playerWon == 2) {
_spriteBatch.Draw(XWonTexture, new Rectangle(10, 0, 50, 600), Color.White);
_spriteBatch.Draw(XWonTexture, new Rectangle(_graphics.PreferredBackBufferWidth - 75, 0, 50, 600), Color.White);
}
DrawTicTacToeFieldRect(rectArray, Color.LightGray); DrawTicTacToeFieldRect(rectArray, Color.LightGray);
@@ -114,6 +125,7 @@ namespace Tic_Tac_Toe {
} }
} }
//Testing one texture draw
//loop through circle pos arr to draw the texture //loop through circle pos arr to draw the texture
/*_spriteBatch.Draw(Circle, new Rectangle(100, 0, 200, 200), Color.White); /*_spriteBatch.Draw(Circle, new Rectangle(100, 0, 200, 200), Color.White);
_spriteBatch.Draw(X, new Rectangle(300, 0, 200, 200), Color.White);*/ _spriteBatch.Draw(X, new Rectangle(300, 0, 200, 200), Color.White);*/

View File

@@ -56,3 +56,5 @@ 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.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\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\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