diff --git a/.vs/Pacman_refactored/DesignTimeBuild/.dtbcache.v2 b/.vs/Pacman_refactored/DesignTimeBuild/.dtbcache.v2
index 41756fa..129aa72 100644
Binary files a/.vs/Pacman_refactored/DesignTimeBuild/.dtbcache.v2 and b/.vs/Pacman_refactored/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/1706fc93-7d12-4422-a082-51fd8c75d993.vsidx b/.vs/Pacman_refactored/FileContentIndex/1706fc93-7d12-4422-a082-51fd8c75d993.vsidx
deleted file mode 100644
index 493f40e..0000000
Binary files a/.vs/Pacman_refactored/FileContentIndex/1706fc93-7d12-4422-a082-51fd8c75d993.vsidx and /dev/null differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/269565db-9a45-40e0-8f9d-e1ffed185708.vsidx b/.vs/Pacman_refactored/FileContentIndex/269565db-9a45-40e0-8f9d-e1ffed185708.vsidx
new file mode 100644
index 0000000..dd65017
Binary files /dev/null and b/.vs/Pacman_refactored/FileContentIndex/269565db-9a45-40e0-8f9d-e1ffed185708.vsidx differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/56d750ff-2091-43eb-9532-36da90a91147.vsidx b/.vs/Pacman_refactored/FileContentIndex/56d750ff-2091-43eb-9532-36da90a91147.vsidx
deleted file mode 100644
index 735a661..0000000
Binary files a/.vs/Pacman_refactored/FileContentIndex/56d750ff-2091-43eb-9532-36da90a91147.vsidx and /dev/null differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/6484866e-eea5-4265-89f6-bab82cfa38b3.vsidx b/.vs/Pacman_refactored/FileContentIndex/6484866e-eea5-4265-89f6-bab82cfa38b3.vsidx
new file mode 100644
index 0000000..3dfbd59
Binary files /dev/null and b/.vs/Pacman_refactored/FileContentIndex/6484866e-eea5-4265-89f6-bab82cfa38b3.vsidx differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/83f76569-efa3-4697-8f06-1197d9a6dcdb.vsidx b/.vs/Pacman_refactored/FileContentIndex/83f76569-efa3-4697-8f06-1197d9a6dcdb.vsidx
deleted file mode 100644
index 3270abc..0000000
Binary files a/.vs/Pacman_refactored/FileContentIndex/83f76569-efa3-4697-8f06-1197d9a6dcdb.vsidx and /dev/null differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/cd81d398-8a1c-41e6-9655-d1d1f678060c.vsidx b/.vs/Pacman_refactored/FileContentIndex/cd81d398-8a1c-41e6-9655-d1d1f678060c.vsidx
new file mode 100644
index 0000000..5786d78
Binary files /dev/null and b/.vs/Pacman_refactored/FileContentIndex/cd81d398-8a1c-41e6-9655-d1d1f678060c.vsidx differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/e78822c6-a2fb-4d7c-8382-b8d581b1c791.vsidx b/.vs/Pacman_refactored/FileContentIndex/e78822c6-a2fb-4d7c-8382-b8d581b1c791.vsidx
deleted file mode 100644
index ddfd93b..0000000
Binary files a/.vs/Pacman_refactored/FileContentIndex/e78822c6-a2fb-4d7c-8382-b8d581b1c791.vsidx and /dev/null differ
diff --git a/.vs/Pacman_refactored/FileContentIndex/ef1bb82f-f1a8-4637-ba07-23eda1c362ca.vsidx b/.vs/Pacman_refactored/FileContentIndex/ef1bb82f-f1a8-4637-ba07-23eda1c362ca.vsidx
new file mode 100644
index 0000000..dda7d3c
Binary files /dev/null and b/.vs/Pacman_refactored/FileContentIndex/ef1bb82f-f1a8-4637-ba07-23eda1c362ca.vsidx differ
diff --git a/.vs/Pacman_refactored/v17/.suo b/.vs/Pacman_refactored/v17/.suo
index a0862d9..0430e47 100644
Binary files a/.vs/Pacman_refactored/v17/.suo and b/.vs/Pacman_refactored/v17/.suo differ
diff --git a/.vs/ProjectEvaluation/pacman_refactored.metadata.v3 b/.vs/ProjectEvaluation/pacman_refactored.metadata.v3
index c922213..290f68e 100644
Binary files a/.vs/ProjectEvaluation/pacman_refactored.metadata.v3 and b/.vs/ProjectEvaluation/pacman_refactored.metadata.v3 differ
diff --git a/.vs/ProjectEvaluation/pacman_refactored.projects.v3 b/.vs/ProjectEvaluation/pacman_refactored.projects.v3
index d99f19d..adf014b 100644
Binary files a/.vs/ProjectEvaluation/pacman_refactored.projects.v3 and b/.vs/ProjectEvaluation/pacman_refactored.projects.v3 differ
diff --git a/MonogameLabel/Class1.cs b/MonogameLabel/Class1.cs
new file mode 100644
index 0000000..7d861de
--- /dev/null
+++ b/MonogameLabel/Class1.cs
@@ -0,0 +1,12 @@
+using System;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+using MonogameLabel.Enums;
+
+namespace MonogameLabel
+{
+ public class Label
+ {
+ }
+}
diff --git a/MonogameLabel/MonogameLabel.csproj b/MonogameLabel/MonogameLabel.csproj
new file mode 100644
index 0000000..cb63190
--- /dev/null
+++ b/MonogameLabel/MonogameLabel.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netcoreapp3.1
+
+
+
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/MonogameLabel/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..ad8dfe1
--- /dev/null
+++ b/MonogameLabel/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfo.cs b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfo.cs
new file mode 100644
index 0000000..5645640
--- /dev/null
+++ b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfo.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("MonogameLabel")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyProductAttribute("MonogameLabel")]
+[assembly: System.Reflection.AssemblyTitleAttribute("MonogameLabel")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Создано классом WriteCodeFragment MSBuild.
+
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfoInputs.cache b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..30552cb
--- /dev/null
+++ b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+f3488a544923f5cf4ff627a8dd1187148f38bf5b
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.GeneratedMSBuildEditorConfig.editorconfig b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.GeneratedMSBuildEditorConfig.editorconfig
new file mode 100644
index 0000000..4b66795
--- /dev/null
+++ b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.GeneratedMSBuildEditorConfig.editorconfig
@@ -0,0 +1,3 @@
+is_global = true
+build_property.RootNamespace = MonogameLabel
+build_property.ProjectDir = C:\Users\Semejkin_AV\Desktop\Pacman_refactored\MonogameLabel\
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.assets.cache b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.assets.cache
new file mode 100644
index 0000000..a5b30af
Binary files /dev/null and b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.assets.cache differ
diff --git a/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.csproj.AssemblyReference.cache b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..f1e1ac0
Binary files /dev/null and b/MonogameLabel/obj/Debug/netcoreapp3.1/MonogameLabel.csproj.AssemblyReference.cache differ
diff --git a/MonogameLabel/obj/MonogameLabel.csproj.nuget.dgspec.json b/MonogameLabel/obj/MonogameLabel.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..a07e340
--- /dev/null
+++ b/MonogameLabel/obj/MonogameLabel.csproj.nuget.dgspec.json
@@ -0,0 +1,68 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj",
+ "projectName": "MonogameLabel",
+ "projectPath": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj",
+ "packagesPath": "C:\\Users\\Semejkin_AV\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Semejkin_AV\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400-preview.22301.10\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.props b/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.props
new file mode 100644
index 0000000..97558c5
--- /dev/null
+++ b/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.props
@@ -0,0 +1,16 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Semejkin_AV\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages
+ PackageReference
+ 6.3.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.targets b/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.targets
new file mode 100644
index 0000000..3dc06ef
--- /dev/null
+++ b/MonogameLabel/obj/MonogameLabel.csproj.nuget.g.targets
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/MonogameLabel/obj/project.assets.json b/MonogameLabel/obj/project.assets.json
new file mode 100644
index 0000000..b386ef7
--- /dev/null
+++ b/MonogameLabel/obj/project.assets.json
@@ -0,0 +1,74 @@
+{
+ "version": 3,
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {}
+ },
+ "libraries": {},
+ "projectFileDependencyGroups": {
+ ".NETCoreApp,Version=v3.1": []
+ },
+ "packageFolders": {
+ "C:\\Users\\Semejkin_AV\\.nuget\\packages\\": {},
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj",
+ "projectName": "MonogameLabel",
+ "projectPath": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj",
+ "packagesPath": "C:\\Users\\Semejkin_AV\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\obj\\",
+ "projectStyle": "PackageReference",
+ "fallbackFolders": [
+ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
+ ],
+ "configFilePaths": [
+ "C:\\Users\\Semejkin_AV\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "C:\\Program Files\\dotnet\\library-packs": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "targetAlias": "netcoreapp3.1",
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48",
+ "net481"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.400-preview.22301.10\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/MonogameLabel/obj/project.nuget.cache b/MonogameLabel/obj/project.nuget.cache
new file mode 100644
index 0000000..3dccd45
--- /dev/null
+++ b/MonogameLabel/obj/project.nuget.cache
@@ -0,0 +1,8 @@
+{
+ "version": 2,
+ "dgSpecHash": "GuTjaNW1kyQRhs8Q1u1GRgtNGJfpTPHLcEAL+P1F2jjRV37oir+kqpfDQBZes3GQpvzr1fukhjH4xyH8JzhpAQ==",
+ "success": true,
+ "projectFilePath": "C:\\Users\\Semejkin_AV\\Desktop\\Pacman_refactored\\MonogameLabel\\MonogameLabel.csproj",
+ "expectedPackageFiles": [],
+ "logs": []
+}
\ No newline at end of file
diff --git a/Pacman_refactored/Classes/Entity.cs b/Pacman_refactored/Classes/Entity/Entity.cs
similarity index 91%
rename from Pacman_refactored/Classes/Entity.cs
rename to Pacman_refactored/Classes/Entity/Entity.cs
index 87f819c..eb93dc0 100644
--- a/Pacman_refactored/Classes/Entity.cs
+++ b/Pacman_refactored/Classes/Entity/Entity.cs
@@ -2,10 +2,10 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Pacman_refactored.Classes.Interfaces;
-using System.Runtime.CompilerServices;
+using Pacman_refactored.Interfaces;
+using Pacman_refactored.Enums;
-namespace Pacman_refactored.Classes
+namespace Pacman_refactored.Classes.Entity
{
public abstract class Entity : IMovable, IRotatable, IAnimate
{
@@ -27,9 +27,10 @@ namespace Pacman_refactored.Classes
public abstract int TextureNumber { get; set; }
public abstract int TextureCount { get; set; }
+
public virtual void Update(GameTime gameTime)
{
- Boundingbox = new Rectangle((int)Position.X, (int)Position.Y, (int)CellSize, (int)CellSize);
+ Boundingbox = new Rectangle((int)Position.X, (int)Position.Y, CellSize, CellSize);
IMovable.DirectionMove(Direction, Position, Speed, Game1.Map);
}
diff --git a/Pacman_refactored/Classes/Ghost.cs b/Pacman_refactored/Classes/Entity/Ghost.cs
similarity index 92%
rename from Pacman_refactored/Classes/Ghost.cs
rename to Pacman_refactored/Classes/Entity/Ghost.cs
index 08ca2c5..89ed33a 100644
--- a/Pacman_refactored/Classes/Ghost.cs
+++ b/Pacman_refactored/Classes/Entity/Ghost.cs
@@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Pacman_refactored.Classes.Interfaces;
-namespace Pacman_refactored.Classes
+using Pacman_refactored.Interfaces;
+using Pacman_refactored.Enums;
+
+namespace Pacman_refactored.Classes.Entity
{
public class Ghost : Entity, IAnimate, IMovable
{
diff --git a/Pacman_refactored/Classes/Pacman.cs b/Pacman_refactored/Classes/Entity/Pacman.cs
similarity index 92%
rename from Pacman_refactored/Classes/Pacman.cs
rename to Pacman_refactored/Classes/Entity/Pacman.cs
index 9d702be..ecc1967 100644
--- a/Pacman_refactored/Classes/Pacman.cs
+++ b/Pacman_refactored/Classes/Entity/Pacman.cs
@@ -1,9 +1,11 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
-using Pacman_refactored.Classes.Interfaces;
-namespace Pacman_refactored.Classes
+using Pacman_refactored.Interfaces;
+using Pacman_refactored.Enums;
+
+namespace Pacman_refactored.Classes.Entity
{
public class Pacman : Entity, IMovable, IRotatable, IAnimate, IControl
{
diff --git a/Pacman_refactored/Classes/Enums.cs b/Pacman_refactored/Classes/Enums.cs
deleted file mode 100644
index 0978f35..0000000
--- a/Pacman_refactored/Classes/Enums.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Pacman_refactored.Classes
-{
- public enum Direction
- {
- Up,
- Down,
- Left,
- Right,
- None
- }
-
- public enum GameState
- {
- Game,
- Menu,
- GameOver,
- NextLevel,
- HowToPlay,
- Exit
- }
-
- public enum GhostType
- {
- Blinky,
- Pinky,
- Inky,
- Clyde
- }
-}
diff --git a/Pacman_refactored/Classes/Food/Dot.cs b/Pacman_refactored/Classes/Food/Dot.cs
new file mode 100644
index 0000000..aee19ea
--- /dev/null
+++ b/Pacman_refactored/Classes/Food/Dot.cs
@@ -0,0 +1,23 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Classes.Food
+{
+ public class Dot : Food
+ {
+ public override Texture2D Texture { get; set; }
+
+ public override Vector2 Position { get; set; }
+ public override int Scale { get; set; }
+ public override int CellSize { get; set; }
+
+ public override Rectangle SourceRect { get; set; }
+ public override Rectangle Boundingbox { get; set; }
+
+ public override int Prize { get; set; }
+ public override bool IsAlive { get; set; }
+ }
+}
diff --git a/Pacman_refactored/Classes/Food/Energizer.cs b/Pacman_refactored/Classes/Food/Energizer.cs
new file mode 100644
index 0000000..7720112
--- /dev/null
+++ b/Pacman_refactored/Classes/Food/Energizer.cs
@@ -0,0 +1,24 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Pacman_refactored.Classes.Interfaces;
+
+namespace Pacman_refactored.Classes.Food
+{
+ public class Energizer : Food, IAnimate
+ {
+ public override Texture2D Texture { get; set; }
+
+ public override Vector2 Position { get; set; }
+ public override int Scale { get; set; }
+ public override int CellSize { get; set; }
+
+ public override Rectangle SourceRect { get; set; }
+ public override Rectangle Boundingbox { get; set; }
+
+ public override int Prize { get; set; }
+ public override bool IsAlive { get; set; }
+ }
+}
diff --git a/Pacman_refactored/Classes/Food/Food.cs b/Pacman_refactored/Classes/Food/Food.cs
new file mode 100644
index 0000000..930de7a
--- /dev/null
+++ b/Pacman_refactored/Classes/Food/Food.cs
@@ -0,0 +1,29 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace Pacman_refactored.Classes.Food
+{
+ public abstract class Food
+ {
+ public abstract Texture2D Texture { get; set; }
+
+ public abstract Vector2 Position { get; set; }
+ public abstract int Scale { get; set; }
+ public abstract int CellSize { get; set; }
+
+ public abstract Rectangle SourceRect { get; set; }
+ public abstract Rectangle Boundingbox { get; set; }
+
+ public abstract int Prize { get; set; }
+
+ public abstract bool IsAlive { get; set; }
+
+ public void Draw(SpriteBatch spriteBatch)
+ {
+ if (IsAlive)
+ {
+ spriteBatch.Draw(Texture, Position, SourceRect, Color.White, 0, new Vector2(CellSize / 2), (float)Scale, SpriteEffects.None, 0);
+ }
+ }
+ }
+}
diff --git a/Pacman_refactored/Classes/Food/Fruit.cs b/Pacman_refactored/Classes/Food/Fruit.cs
new file mode 100644
index 0000000..8fe7ca8
--- /dev/null
+++ b/Pacman_refactored/Classes/Food/Fruit.cs
@@ -0,0 +1,23 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Classes.Food
+{
+ public class Fruit : Food
+ {
+ public override Texture2D Texture { get; set; }
+
+ public override Vector2 Position { get; set; }
+ public override int Scale { get; set; }
+ public override int CellSize { get; set; }
+
+ public override Rectangle SourceRect { get; set; }
+ public override Rectangle Boundingbox { get; set; }
+
+ public override int Prize { get; set; }
+ public override bool IsAlive { get; set; }
+ }
+}
diff --git a/Pacman_refactored/Classes/UI/Label/Enums/HorizontalAlignment.cs b/Pacman_refactored/Classes/UI/Label/Enums/HorizontalAlignment.cs
new file mode 100644
index 0000000..1186494
--- /dev/null
+++ b/Pacman_refactored/Classes/UI/Label/Enums/HorizontalAlignment.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Classes.UI.Label.Enums
+{
+ public enum HoriZontalAlignment
+ {
+ Top,
+ Center,
+ Right
+ }
+}
diff --git a/Pacman_refactored/Classes/UI/Label/Enums/VerticalAlignment.cs b/Pacman_refactored/Classes/UI/Label/Enums/VerticalAlignment.cs
new file mode 100644
index 0000000..b6f0991
--- /dev/null
+++ b/Pacman_refactored/Classes/UI/Label/Enums/VerticalAlignment.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Classes.UI.Label.Enums
+{
+ public enum VerticalAlignment
+ {
+ Top,
+ Center,
+ Bottom
+ }
+}
diff --git a/Pacman_refactored/Classes/UI/Label/Label.cs b/Pacman_refactored/Classes/UI/Label/Label.cs
new file mode 100644
index 0000000..7b57902
--- /dev/null
+++ b/Pacman_refactored/Classes/UI/Label/Label.cs
@@ -0,0 +1,30 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace Pacman_refactored.Classes.UI.Label
+{
+ public class Label
+ {
+ public Vector2 Position { get; set; }
+
+ public SpriteFont SpriteFont { get; set; }
+ public Color Color { get; set; }
+
+ public string Text { get; set; }
+
+ public Label()
+ {
+ Position = new Vector2(0, 0);
+ Text = "Label";
+ Color = Color.White;
+ }
+
+ public Label(SpriteFont sprteFont, string text, Vector2 position, Color color)
+ {
+ SpriteFont = sprteFont;
+ Text = text;
+ Position = position;
+ Color = color;
+ }
+ }
+}
diff --git a/Pacman_refactored/Classes/UI/Menu.cs b/Pacman_refactored/Classes/UI/Menu.cs
new file mode 100644
index 0000000..829c8f3
--- /dev/null
+++ b/Pacman_refactored/Classes/UI/Menu.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using Pacman_refactored.Enums;
+using Pacman_refactored.Interfaces;
+
+namespace Pacman_refactored.Classes.UI
+{
+ public abstract class Menu : IControl
+ {
+ public abstract string[] MenuItems { get; set; }
+ }
+}
diff --git a/Pacman_refactored/Enums/Direction.cs b/Pacman_refactored/Enums/Direction.cs
new file mode 100644
index 0000000..bb6f224
--- /dev/null
+++ b/Pacman_refactored/Enums/Direction.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Enums
+{
+ public enum Direction
+ {
+ Up,
+ Down,
+ Left,
+ Right,
+ None
+ }
+}
diff --git a/Pacman_refactored/Enums/GameState.cs b/Pacman_refactored/Enums/GameState.cs
new file mode 100644
index 0000000..1395e5c
--- /dev/null
+++ b/Pacman_refactored/Enums/GameState.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Enums
+{
+ public enum GameState
+ {
+ Game,
+ Menu,
+ GameOver,
+ NextLevel,
+ HowToPlay,
+ Exit
+ }
+}
diff --git a/Pacman_refactored/Enums/GhostType.cs b/Pacman_refactored/Enums/GhostType.cs
new file mode 100644
index 0000000..5c3d315
--- /dev/null
+++ b/Pacman_refactored/Enums/GhostType.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Pacman_refactored.Enums
+{
+ public enum GhostType
+ {
+ Blinky,
+ Pinky,
+ Inky,
+ Clyde
+ }
+}
diff --git a/Pacman_refactored/Game1.cs b/Pacman_refactored/Game1.cs
index f3a4fe3..532347e 100644
--- a/Pacman_refactored/Game1.cs
+++ b/Pacman_refactored/Game1.cs
@@ -2,6 +2,8 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
+using Pacman_refactored.Classes;
+
namespace Pacman_refactored
{
public class Game1 : Game
@@ -9,11 +11,15 @@ namespace Pacman_refactored
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
+ public static Map Map;
+
public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
+
+ Map = new Map();
}
protected override void Initialize()
diff --git a/Pacman_refactored/Classes/Interfaces/IAnimate.cs b/Pacman_refactored/Interfaces/IAnimate.cs
similarity index 100%
rename from Pacman_refactored/Classes/Interfaces/IAnimate.cs
rename to Pacman_refactored/Interfaces/IAnimate.cs
diff --git a/Pacman_refactored/Classes/Interfaces/IBoostable.cs b/Pacman_refactored/Interfaces/IBoostable.cs
similarity index 62%
rename from Pacman_refactored/Classes/Interfaces/IBoostable.cs
rename to Pacman_refactored/Interfaces/IBoostable.cs
index f5d1edc..710f391 100644
--- a/Pacman_refactored/Classes/Interfaces/IBoostable.cs
+++ b/Pacman_refactored/Interfaces/IBoostable.cs
@@ -6,5 +6,11 @@ namespace Pacman_refactored.Classes.Interfaces
{
public interface IBoostable
{
+ int BoostCooldown { get; set; }
+
+ void OnBoost(Entity entity)
+ {
+
+ }
}
}
diff --git a/Pacman_refactored/Classes/Interfaces/IControl.cs b/Pacman_refactored/Interfaces/IControl.cs
similarity index 96%
rename from Pacman_refactored/Classes/Interfaces/IControl.cs
rename to Pacman_refactored/Interfaces/IControl.cs
index 6572daf..8f33119 100644
--- a/Pacman_refactored/Classes/Interfaces/IControl.cs
+++ b/Pacman_refactored/Interfaces/IControl.cs
@@ -3,7 +3,9 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
-namespace Pacman_refactored.Classes.Interfaces
+using Pacman_refactored.Enums;
+
+namespace Pacman_refactored.Interfaces
{
public interface IControl
{
diff --git a/Pacman_refactored/Classes/Interfaces/IMovable.cs b/Pacman_refactored/Interfaces/IMovable.cs
similarity index 97%
rename from Pacman_refactored/Classes/Interfaces/IMovable.cs
rename to Pacman_refactored/Interfaces/IMovable.cs
index bee0964..09ccc73 100644
--- a/Pacman_refactored/Classes/Interfaces/IMovable.cs
+++ b/Pacman_refactored/Interfaces/IMovable.cs
@@ -3,7 +3,10 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Collections.Generic;
-namespace Pacman_refactored.Classes.Interfaces
+using Pacman_refactored.Enums;
+using Pacman_refactored.Classes;
+
+namespace Pacman_refactored.Interfaces
{
public interface IMovable
{
diff --git a/Pacman_refactored/Classes/Interfaces/IRotatable.cs b/Pacman_refactored/Interfaces/IRotatable.cs
similarity index 91%
rename from Pacman_refactored/Classes/Interfaces/IRotatable.cs
rename to Pacman_refactored/Interfaces/IRotatable.cs
index a168190..d4a4ecd 100644
--- a/Pacman_refactored/Classes/Interfaces/IRotatable.cs
+++ b/Pacman_refactored/Interfaces/IRotatable.cs
@@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.Text;
-namespace Pacman_refactored.Classes.Interfaces
+using Pacman_refactored.Enums;
+
+namespace Pacman_refactored.Interfaces
{
public interface IRotatable
{