diff --git a/Food.cs b/Food.cs
deleted file mode 100644
index 11ca496..0000000
--- a/Food.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using SFML.System;
-using SFML.Graphics;
-
-namespace SnakeGame
-
-{
- public class Food
- {
- static Random rnd = new Random();
- public Vector2f Position { get; set; }
- public RectangleShape FoodShape { get; set; }
- public Vector2f Size { get; set; }
-
- ///
- /// Will Create a food object with random values 0 - windowsize + 1
- ///
- ///
- ///
- ///
- public Food(float sizeX, float sizeY, int constWindowSize)
- {
- int random1 = rnd.Next(0, constWindowSize + 1);
- int random2 = rnd.Next(0, constWindowSize + 1);
- if (random1 % 10 != 0)
- {
- if (random1 % 10 < 5)
- {
- random1 -= random1 % 10;
- }
- else
- {
- random1 += 5;
- random1 -= random1 % 10;
- }
- }
- if (random2 % 10 != 0)
- {
- if (random2 % 10 < 5)
- {
- random2 -= random2 % 10;
- }
- else
- {
- random2 += 5;
- random2 -= random2 % 10;
- }
- }
- Position = new Vector2f(random1, random2);
- Size = new Vector2f(sizeX,sizeY);
- FoodShape = new RectangleShape(Size);
- FoodShape.Position = Position;
- FoodShape.FillColor = Color.Blue;
- }
- }
-}
\ No newline at end of file
diff --git a/GameManager.cs b/GameManager.cs
deleted file mode 100644
index cccb26f..0000000
--- a/GameManager.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using SFML.System;
-using SFML.Graphics;
-using SFML.Window;
-using System.Diagnostics;
-
-namespace SnakeGame
-{
- ///
- /// Builds objects needed to run game and manages there states and movements.
- ///
- public class GameManager
- {
- private enum MoveDirection
- {
- LEFT, RIGHT, UP, DOWN
- };
- private MoveDirection? _currentMoveDirection = null;
- private Vector2f _moveLeft = new Vector2f(-10, 0);
- private Vector2f _moveRight = new Vector2f(10, 0);
- private Vector2f _moveUp = new Vector2f(0, -10);
- private Vector2f _moveDown = new Vector2f(0, 10);
- public Snake[] snakeArray = new Snake[200];
- public Food food;
- public bool GameIsActive = true;
- public GameText gameText { get; set; }
- private int _score = 0;
-
-
-
- public GameManager()
- {
- snakeArray[0] = new Snake(300f, 300f, 10f, 10f, true, true);
- for (int counter = 1; counter < snakeArray.Length; counter++)
- {
- snakeArray[counter] = new Snake(300f, 300f, 10f, 10f, false, false);
- }
- food = new Food(10f, 10f, SimpleWindow.WINDOW);
- gameText = new GameText(_score.ToString());
- }
-
- ///
- /// Starts at back of tail and moves all Position data down the array one spot
- ///
- ///
- public void MoveSnake(ref Snake[] snakeArray)
- {
-
- if (_currentMoveDirection != null)
- {
- for (int counter = snakeArray.Length - 1; counter >= 1; counter--)
- {
- snakeArray[counter].SnakeShape.Position = snakeArray[counter - 1].SnakeShape.Position;
- }
-
- switch (_currentMoveDirection)
- {
- case MoveDirection.LEFT:
- {
- Vector2f newPosition = snakeArray[0].SnakeShape.Position + _moveLeft;
- snakeArray[0].SnakeShape.Position = newPosition;
- break;
- }
- case MoveDirection.RIGHT:
- {
- Vector2f newPosition = snakeArray[0].SnakeShape.Position + _moveRight;
- snakeArray[0].SnakeShape.Position = newPosition;
- break;
- }
- case MoveDirection.UP:
- {
- Vector2f newPosition = snakeArray[0].SnakeShape.Position + _moveUp;
- snakeArray[0].SnakeShape.Position = newPosition;
- break;
- }
- case MoveDirection.DOWN:
- {
- Vector2f newPosition = snakeArray[0].SnakeShape.Position + _moveDown;
- snakeArray[0].SnakeShape.Position = newPosition;
- break;
- }
- }
-
-
- }
- }
-
- ///
- /// Set a field that determines the heads next move direction based on input from keyboard
- ///
- ///
- ///
- public void SetMoveDirection(object sender, SFML.Window.KeyEventArgs e)
- {
- switch (e.Code)
- {
- case SFML.Window.Keyboard.Key.Left:
- _currentMoveDirection = MoveDirection.LEFT;
- break;
- case SFML.Window.Keyboard.Key.Down:
- _currentMoveDirection = MoveDirection.DOWN;
- break;
- case SFML.Window.Keyboard.Key.Right:
- _currentMoveDirection = MoveDirection.RIGHT;
- break;
- case SFML.Window.Keyboard.Key.Up:
- _currentMoveDirection = MoveDirection.UP;
- break;
-
- }
- }
-
- ///
- /// Flips a bool on the next element that it finds to be flipable to cause that Snake to be drawn
- ///
- ///
- public void AddTail(ref Snake[] snakeArray)
- {
- bool NotFoundUnActiveSnake = true;
- int counter = 1;
- while(NotFoundUnActiveSnake)
- {
- if (snakeArray[counter].IsActive == false)
- {
- snakeArray[counter].IsActive = true;
- NotFoundUnActiveSnake = false;
- }
- else
- {
- counter++;
- }
- }
- }
-
- public void RestartGame(object sender, SFML.Window.KeyEventArgs e)
- {
- if(GameIsActive == false && e.Code == SFML.Window.Keyboard.Key.Space)
- {
- GameIsActive = true;
- _score = 0;
- snakeArray[0] = new Snake(300f, 300f, 10f, 10f, true, true);
- for (int counter = 1; counter < snakeArray.Length; counter++)
- {
- snakeArray[counter] = new Snake(300f, 300f, 10f, 10f, false, false);
- }
- food = new Food(10f, 10f, SimpleWindow.WINDOW);
- gameText = new GameText(_score.ToString());
- _currentMoveDirection = null;
- }
- }
- ///
- /// Checks for Head to tail colision as well as head to food
- ///
- ///
- ///
- public void CheckForColision(ref Snake[] snakeArray, ref Food food)
- {
- //counter = 1 to skip head
- for (int counter1 = 1; counter1 < snakeArray.Length; counter1++)
- {
- if (snakeArray[0].SnakeShape.Position == snakeArray[counter1].SnakeShape.Position && snakeArray[counter1].IsActive == true)
- {
- GameIsActive = false;
- }
- }
- //Food
- if (snakeArray[0].SnakeShape.Position == food.FoodShape.Position)
- {
- AddTail(ref snakeArray);
- food = new Food(10f, 10f, SimpleWindow.WINDOW);
- _score += 10;
- gameText = new GameText(_score.ToString());
-
- }
- if (snakeArray[0].SnakeShape.Position.X > 600 || snakeArray[0].SnakeShape.Position.X < 0 || snakeArray[0].SnakeShape.Position.Y > 600 || snakeArray[0].SnakeShape.Position.Y < 0)
- {
- GameIsActive = false;
- }
- }
- }
-}
diff --git a/GameText.cs b/GameText.cs
deleted file mode 100644
index 476fe87..0000000
--- a/GameText.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using SFML.Graphics;
-
-namespace SnakeGame
-{
- public class GameText
- {
- public Text ScoreText { get; set; }
- public Text GameOverText { get; set; }
- public Font FontFaimly { get; set; }
- public string Score { get; set; }
- private string _GameOverMessage;
- private string _ScoreMessage = "Points: ";
- public GameText(string score, string fontFaimly = "Roboto-Regular.ttf")
- {
- Score = score;
- FontFaimly = new Font(fontFaimly);
- ScoreText = new Text(_ScoreMessage + Score, FontFaimly,16);
- _GameOverMessage = "GAMEOVER! You got " + Score + " points GOOD JOB!, hit SPACE to try again";
- GameOverText = new Text(_GameOverMessage, FontFaimly,16);
- GameOverText.Position = new SFML.System.Vector2f(70f, 300f);
- }
- }
-}
diff --git a/Linux1.0.zip b/Linux1.0.zip
new file mode 100644
index 0000000..9152ba9
Binary files /dev/null and b/Linux1.0.zip differ
diff --git a/Notes.md b/Notes.md
deleted file mode 100644
index 5d0d8f2..0000000
--- a/Notes.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Production notes / scratch pad
-
-*GameManager* *Snake* *Movement* *snakeArray*
-Array for snake should be as long as the snake will ever be, values in movement will always be pushed down the array so at any given time the next tail section just needs to be set to active to become visible as it will already have an object with *Position* data.
-
-### Bugs
-``` Currently movement does not work, I think it has something to do with how position is being used, SFML says I should be able to just change position and it will render
- at the new location but that does not seem to be working? But I can check the objects and see the position changing. ```
-
-``` Game Crashes after running for a short period with no errors```
diff --git a/Program.cs b/Program.cs
deleted file mode 100644
index 7c0708f..0000000
--- a/Program.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-
-namespace SnakeGame
-{
- class Program
- {
-
- static void Main(string[] args)
- {
-
- var window = new SimpleWindow();
- window.Run();
-
-
-
- }
- }
-}
diff --git a/Roboto-Regular.ttf b/Roboto-Regular.ttf
deleted file mode 100644
index cb8ffcf..0000000
Binary files a/Roboto-Regular.ttf and /dev/null differ
diff --git a/SimpleWindow.cs b/SimpleWindow.cs
deleted file mode 100644
index 5fdbb37..0000000
--- a/SimpleWindow.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-using SFML;
-using System;
-namespace SnakeGame
-{
- public class SimpleWindow
- {
- public const int WINDOW = 600;
-
- public void Run()
- {
- GameManager gameManager = new GameManager();
- //Window Options
- var mode = new SFML.Window.VideoMode(WINDOW, WINDOW);
- var window = new SFML.Graphics.RenderWindow(mode, "Malikaz Snake");
- //Keyboard Event Handlers
- window.KeyPressed += Window_KeyPressed;
- window.KeyPressed += gameManager.SetMoveDirection;
- window.KeyPressed += gameManager.RestartGame;
-
-
- //Time
- DateTime timer1 = DateTime.Now;
-
- // Start the game loop
- while (window.IsOpen)
- {
- System.Threading.Thread.Sleep(5);
- //Clear Window
- window.Clear();
- DateTime timer2 = DateTime.Now;
-
- // Process events
- window.DispatchEvents();
- TimeSpan timeSinceLastUpdate = timer2 - timer1;
- if (timeSinceLastUpdate.TotalSeconds >= .1 && gameManager.GameIsActive == true)
- {
-
- gameManager.MoveSnake(ref gameManager.snakeArray);
- gameManager.CheckForColision(ref gameManager.snakeArray, ref gameManager.food);
- timer1 = DateTime.Now;
- }
- else if(gameManager.GameIsActive == false)
- {
- window.Draw(gameManager.gameText.GameOverText);
- }
- for (int counter = 0; counter < gameManager.snakeArray.Length; counter++)
- {
- if (gameManager.snakeArray[counter].IsActive == true)
- {
- window.Draw(gameManager.snakeArray[counter].SnakeShape);
- }
- }
-
- window.Draw(gameManager.gameText.ScoreText);
- window.Draw(gameManager.food.FoodShape);
-
-
- // Finally, display the rendered frame on screen
- window.Display();
- }
- }
-
- ///
- /// Function called when a key is pressed
- ///
- private void Window_KeyPressed(object sender, SFML.Window.KeyEventArgs e)
- {
- var window = (SFML.Window.Window)sender;
- if (e.Code == SFML.Window.Keyboard.Key.Escape)
- {
- window.Close();
- }
-
- }
- private void Window_Close(object sender, EventArgs e)
- {
- var window = (SFML.Window.Window)sender;
- window.Close();
- }
- }
-}
\ No newline at end of file
diff --git a/Snake.cs b/Snake.cs
deleted file mode 100644
index 71fd105..0000000
--- a/Snake.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.Numerics;
-using System.Diagnostics;
-using SFML.Graphics;
-using SFML.System;
-namespace SnakeGame
-{
-
- public class Snake
- {
- public Vector2f Position { get; set; }
- public Vector2f Size { get; set; }
- public bool IsHead { get; set; }
- public bool IsActive { get; set; }
- public RectangleShape SnakeShape { get; set; }
- ///
- /// Makes a new snake with contains a SFML Rectangle object
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public Snake(float posX, float posY, float sizeX, float sizeY, bool isHead, bool isActive)
- {
- Position = new Vector2f(posX, posY);
- Size = new Vector2f (sizeX,sizeY);
- IsHead = isHead;
- IsActive = isActive;
- SnakeShape = new RectangleShape(Size);
- SnakeShape.Position = Position;
- SnakeShape.FillColor = Color.Magenta;
- }
-
- public Snake() { }
-
-
-
- }
-
-}
\ No newline at end of file
diff --git a/SnakeGame.csproj b/SnakeGame.csproj
deleted file mode 100644
index f7d3c0f..0000000
--- a/SnakeGame.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- Exe
- netcoreapp3.0
-
-
-
-
-
-
-
diff --git a/Source1.0.zip b/Source1.0.zip
new file mode 100644
index 0000000..d97969b
Binary files /dev/null and b/Source1.0.zip differ
diff --git a/osx1.0.zip b/osx1.0.zip
new file mode 100644
index 0000000..067a37c
Binary files /dev/null and b/osx1.0.zip differ
diff --git a/readme.md b/readme.md
deleted file mode 100644
index 60082a3..0000000
--- a/readme.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Snake Game Project
-Learn more about the SFML library for C#
-See whats different from CPP
\ No newline at end of file
diff --git a/windows1.0.zip b/windows1.0.zip
new file mode 100644
index 0000000..475a462
Binary files /dev/null and b/windows1.0.zip differ