diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 Snake.sln
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Snake.sln Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "axios_snake", "axios_snake\axios_snake\axios_snake.csproj", "{15D44C24-299F-40EF-9AE9-7DA117D5AA0B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "axios_snakeContent", "axios_snake\axios_snakeContent\axios_snakeContent.contentproj", "{664607B5-E371-44CA-A2D0-A7ECF21237A7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|Windows Phone = Debug|Windows Phone
+ Debug|x86 = Debug|x86
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|Windows Phone = Release|Windows Phone
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|Windows Phone.ActiveCfg = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|Windows Phone.Build.0 = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|x86.ActiveCfg = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Debug|x86.Build.0 = Debug|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|Mixed Platforms.Build.0 = Release|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|Windows Phone.ActiveCfg = Release|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|Windows Phone.Build.0 = Release|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|x86.ActiveCfg = Release|x86
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}.Release|x86.Build.0 = Release|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Debug|Windows Phone.ActiveCfg = Debug|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Debug|x86.ActiveCfg = Debug|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|Windows Phone.ActiveCfg = Release|x86
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|x86.ActiveCfg = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/DifficultyMenu.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/DifficultyMenu.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,49 @@
+using FarseerPhysics.SamplesFramework;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using GameStateManagement;
+
+namespace axios_snake
+{
+ class DifficultyMenu : MenuScreen
+ {
+ public DifficultyMenu() : base("Axios Snake") { }
+
+ public override void Activate(bool instancePreserved)
+ {
+ base.Activate(instancePreserved);
+
+ MenuEntries.Add(new MenuEntry("Easy"));
+ MenuEntries.Add(new MenuEntry("Medium"));
+ MenuEntries.Add(new MenuEntry("Hard"));
+ }
+
+ protected override void OnSelectEntry(int entryIndex, PlayerIndex playerIndex)
+ {
+ base.OnSelectEntry(entryIndex, playerIndex);
+
+ switch (entryIndex)
+ {
+ case 0:
+ ScreenManager.AddScreen(new SnakeScreen(10), PlayerIndex.One);
+ break;
+ case 1:
+ ScreenManager.AddScreen(new SnakeScreen(15), PlayerIndex.One);
+ break;
+ case 2:
+ ScreenManager.AddScreen(new SnakeScreen(16), PlayerIndex.One);
+ break;
+ default:
+ break;
+ }
+ }
+
+ protected override void OnCancel(PlayerIndex playerIndex)
+ {
+ base.OnCancel(playerIndex);
+
+ ScreenManager.Game.Exit();
+ }
+
+ }
+}
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Game.ico
Binary file axios_snake/axios_snake/Game.ico has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Game1.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/Game1.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,108 @@
+using FarseerPhysics.SamplesFramework;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using GameStateManagement;
+
+namespace axios_snake
+{
+ ///
+ /// This is the main type for your game
+ ///
+ public class Game1 : Microsoft.Xna.Framework.Game
+ {
+ GraphicsDeviceManager graphics;
+ SpriteBatch spriteBatch;
+
+ public ScreenManager ScreenManager { get; set; }
+
+ public Game1()
+ {
+ graphics = new GraphicsDeviceManager(this);
+ Content.RootDirectory = "Content";
+
+ graphics.IsFullScreen = false;
+ graphics.PreferredBackBufferWidth = 1280;
+ graphics.PreferredBackBufferHeight = 720;
+
+ ConvertUnits.SetDisplayUnitToSimUnitRatio(Axios.Settings.DisplayUnitToSimUnitRatio);
+
+ ScreenManager = new ScreenManager(this);
+
+ Components.Add(ScreenManager);
+ }
+
+ protected override void Initialize()
+ {
+ base.Initialize();
+ BackgroundScreen bg = new BackgroundScreen();
+ ScreenManager.AddScreen(bg, PlayerIndex.One);
+ ScreenManager.AddScreen(new MainMenu(), PlayerIndex.One);
+ }
+
+ protected override void LoadContent()
+ {
+ spriteBatch = new SpriteBatch(GraphicsDevice);
+
+ }
+
+ protected override void UnloadContent()
+ {
+ // TODO: Unload any non ContentManager content here
+ }
+
+ protected override void Update(GameTime gameTime)
+ {
+ base.Update(gameTime);
+ }
+
+ protected override void Draw(GameTime gameTime)
+ {
+ GraphicsDevice.Clear(Color.CornflowerBlue);
+
+ base.Draw(gameTime);
+ }
+
+ }
+
+ class MainMenu : MenuScreen
+ {
+ public MainMenu() : base("Axios Snake") { }
+
+ public override void Activate(bool instancePreserved)
+ {
+ base.Activate(instancePreserved);
+
+ MenuEntries.Add(new MenuEntry("New Game"));
+ MenuEntries.Add(new MenuEntry("Difficulty"));
+ MenuEntries.Add(new MenuEntry("Exit Game"));
+ }
+
+ protected override void OnSelectEntry(int entryIndex, PlayerIndex playerIndex)
+ {
+ base.OnSelectEntry(entryIndex, playerIndex);
+
+ switch (entryIndex)
+ {
+ case 0:
+ ScreenManager.AddScreen(new SnakeScreen(10), PlayerIndex.One);
+ break;
+ case 1:
+ ScreenManager.AddScreen(new DifficultyMenu(), PlayerIndex.One);
+ break;
+ case 2:
+ this.ScreenManager.Game.Exit();
+ break;
+ default:
+ break;
+ }
+ }
+
+ protected override void OnCancel(PlayerIndex playerIndex)
+ {
+ base.OnCancel(playerIndex);
+
+ ScreenManager.Game.Exit();
+ }
+
+ }
+}
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/GameThumbnail.png
Binary file axios_snake/axios_snake/GameThumbnail.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Objects/Ball.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/Objects/Ball.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,45 @@
+using Axios.Engine;
+using FarseerPhysics.Dynamics;
+using FarseerPhysics.Dynamics.Contacts;
+using FarseerPhysics.Factories;
+using FarseerPhysics.SamplesFramework;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+
+namespace axios_snake
+{
+ class Ball : SimpleDrawableAxiosGameObject
+ {
+
+ public Ball(Vector2 position)
+ {
+ this.Position = position;
+ }
+
+ public override void LoadContent(AxiosGameScreen gameScreen)
+ {
+ base.LoadContent(gameScreen);
+
+ this.Texture = gameScreen.ScreenManager.Game.Content.Load("ball");
+ this.Origin = new Vector2(this.Texture.Width / 2, this.Texture.Height / 2);
+ this.BodyPart = BodyFactory.CreateCircle(gameScreen.World, ConvertUnits.ToSimUnits(this.Texture.Width / 2), 1f);
+
+ this.BodyPart.Position = this.Position;
+ this.BodyPart.BodyType = BodyType.Static;
+ this.BodyPart.Restitution = 1f;
+ this.BodyPart.Friction = 0f;
+ this.BodyPart.UserData = this;
+ this.BodyPart.OnCollision += new OnCollisionEventHandler(BodyPart_OnCollision);
+
+ }
+
+ bool BodyPart_OnCollision(Fixture fixtureA, Fixture fixtureB, Contact contact)
+ {
+ this.BodyPart.IsStatic = false;
+ this.Remove();
+ this.Position = Vector2.Zero;
+ return true;
+ }
+ }
+}
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Objects/Snake.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/Objects/Snake.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,97 @@
+using Axios.Engine;
+using FarseerPhysics.Dynamics;
+using FarseerPhysics.Dynamics.Contacts;
+using FarseerPhysics.Factories;
+using FarseerPhysics.SamplesFramework;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System.Collections.Generic;
+
+namespace axios_snake
+{
+ class Snake : SimpleDrawableAxiosGameObject
+ {
+ public Snake() { }
+
+ private List vector;
+
+ public Snake(Vector2 position)
+ {
+ this.Position = position;
+ vector = new List();
+ }
+
+ public override void LoadContent(AxiosGameScreen gameScreen)
+ {
+ base.LoadContent(gameScreen);
+
+ this.Texture = gameScreen.ScreenManager.Game.Content.Load("goo");
+ this.Origin = new Vector2(this.Texture.Width / 2, this.Texture.Height / 2);
+ this.BodyPart = BodyFactory.CreateCircle(gameScreen.World, ConvertUnits.ToSimUnits(this.Texture.Width / 2), 1f);
+
+ this.BodyPart.Position = this.Position;
+ this.BodyPart.BodyType = BodyType.Dynamic;
+ this.BodyPart.Friction = 0f;
+ this.BodyPart.Restitution = 1f;
+ this.BodyPart.UserData = this;
+ this.BodyPart.OnCollision += new OnCollisionEventHandler(BodyPart_OnCollision);
+
+ this.BodyPart.LinearVelocity = Vector2.Zero;
+ this.ConstantVelocity = ConvertUnits.ToSimUnits(0f, 0f);
+ this.ApplyConstantVelocity = true;
+
+
+ }
+
+
+ bool BodyPart_OnCollision(Fixture fixtureA, Fixture fixtureB, Contact contact)
+ {
+ return true;
+ }
+
+ //To avoid having the snakes on top of each other, I add 4 values to delay the snake
+ public void initPath(Vector2 defaultPath, int snakeSpeed)
+ {
+ switch (snakeSpeed)
+ {
+ case 10:
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ break;
+ case 15:
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ break;
+ case 16:
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ vector.Add(defaultPath);
+ break;
+ }
+
+ }
+
+ //The game is constantly grabbing the path of the snake, then puts the value into a temp position and removes the first value in the vector list
+ public void setPath(Vector2 vec)
+ {
+ vector.Add(vec);
+ }
+
+
+ public Vector2 getPath()
+ {
+
+ Vector2 temp = vector[0];
+ return temp;
+ }
+
+ public void removePath()
+ {
+ vector.RemoveAt(0);
+ }
+ //****//
+ }
+}
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Program.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/Program.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using GameStateManagement;
+using Microsoft.Xna.Framework;
+
+namespace axios_snake
+{
+ static class Program
+ {
+ static void Main(string[] args)
+ {
+ using (Game1 game = new Game1())
+ {
+ game.Run();
+ }
+
+ }
+ }
+}
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/Properties/AssemblyInfo.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/Properties/AssemblyInfo.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("axios_snake")]
+[assembly: AssemblyProduct("axios_snake")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type. Only Windows
+// assemblies support COM.
+[assembly: ComVisible(false)]
+
+// On Windows, the following GUID is for the ID of the typelib if this
+// project is exposed to COM. On other platforms, it unique identifies the
+// title storage container when deploying this assembly to the device.
+[assembly: Guid("16365f46-a8ec-4ce8-b401-f1427bae1ae8")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/SnakeScreen.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/SnakeScreen.cs Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,212 @@
+using Axios;
+using Axios.Engine;
+using FarseerPhysics;
+using FarseerPhysics.SamplesFramework;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using GameStateManagement;
+using System;
+using System.Collections.Generic;
+
+
+namespace axios_snake
+{
+ class SnakeScreen : AxiosGameScreen
+ {
+ private Ball ball;
+
+ private KeyboardState currentKeyState;
+
+ private List snake;
+
+ private SpriteFont scoreFont;
+
+ private Vector2 defaultSnake;
+ private Vector2 snakeLocation;
+
+ private bool right, left, up, down;
+ private bool play;
+
+ private int snakeSpeed;
+
+ private const int ballSize = 50;
+ private const int snakeSize = 50;
+
+ private string strScore;
+
+ public SnakeScreen(int snakeSpeed)
+ {
+ this.HasVirtualStick = true;
+ this.HasCursor = false;
+ EnableCameraControl = false;
+ TransitionOnTime = TimeSpan.FromSeconds(1.5);
+ TransitionOffTime = TimeSpan.FromSeconds(0.5);
+ this.snakeSpeed = snakeSpeed;
+ }
+
+ public override void Activate(bool instancePreserved)
+ {
+ base.Activate(instancePreserved);
+ init();
+ }
+
+
+ private void init()
+ {
+ snakeLocation = new Vector2();
+
+ defaultSnake = new Vector2();
+ defaultSnake = ConvertUnits.ToSimUnits(((-1 * (this.ScreenManager.GraphicsDevice.Viewport.Width / 2)) - snakeSize), ((-1 * (this.ScreenManager.GraphicsDevice.Viewport.Height / 2)) - snakeSize));
+
+ snake = new List();
+ snake.Add(new Snake(ConvertUnits.ToSimUnits(0,0)));
+ AddGameObject(snake[0]);
+ snake[0].initPath(defaultSnake, snakeSpeed);
+
+
+
+ play = true;
+ right = left = down = up = false;
+
+ ball = new Ball(randomNum());
+ AddGameObject(ball);
+
+ scoreFont = ScreenManager.Game.Content.Load("font");
+ strScore = (snake.Count - 1).ToString();
+
+ }
+
+ //Used to place the ball around screen
+ private Vector2 randomNum()
+ {
+ int randx = (this.ScreenManager.GraphicsDevice.Viewport.Width / 2) - ballSize;
+ int randy = (this.ScreenManager.GraphicsDevice.Viewport.Height / 2) - ballSize;
+
+ System.Random random = new System.Random();
+ Vector2 randNum = new Vector2(ConvertUnits.ToSimUnits(random.Next(-1 * randx, randx)), ConvertUnits.ToSimUnits(random.Next(-1 * randy, randy)));
+
+ return randNum;
+ }
+
+ private void resetGame()
+ {
+ play = false;
+ snake.Clear();
+ this.RemoveAll();
+ init();
+ }
+
+
+ public override void Draw(GameTime gameTime)
+ {
+ base.Draw(gameTime);
+ ScreenManager.SpriteBatch.Begin();
+ ScreenManager.SpriteBatch.DrawString(scoreFont, strScore, new Vector2(this.ScreenManager.GraphicsDevice.Viewport.Width - 40, 0), Color.Aqua);
+ ScreenManager.SpriteBatch.End();
+ }
+
+ public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
+ {
+ base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
+
+ if (play)
+ {
+ strScore = (snake.Count - 1).ToString();
+
+ //if snake hits the ball
+ if (ball.Position == Vector2.Zero)
+ {
+ ball = new Ball(randomNum());
+ AddGameObject(ball);
+
+ snake.Add(new Snake(Vector2.Zero));
+ snake[snake.Count - 1].initPath(defaultSnake, snakeSpeed);
+ AddGameObject(snake[snake.Count - 1]);
+ }
+
+ currentKeyState = Keyboard.GetState();
+ if (currentKeyState.IsKeyDown(Keys.Right))
+ {
+ if (!left)
+ {
+ right = true;
+ left = up = down = false;
+ }
+ }
+ else if (currentKeyState.IsKeyDown(Keys.Left))
+ {
+ if (!right)
+ {
+ left = true;
+ right = up = down = false;
+ }
+ }
+ else if (currentKeyState.IsKeyDown(Keys.Up))
+ {
+ if (!down)
+ {
+ up = true;
+ down = left = right = false;
+ }
+ }
+ else if (currentKeyState.IsKeyDown(Keys.Down))
+ {
+ if (!up)
+ {
+ down = true;
+ up = left = right = false;
+ }
+ }
+
+ if (right)
+ {
+ if (snake.Count > 1)
+ snake[0].setPath(snakeLocation);
+ snakeLocation += ConvertUnits.ToSimUnits(snakeSpeed, 0);
+ snake[0].BodyPart.Position = snakeLocation;
+ }
+ if (left)
+ {
+ if (snake.Count > 1)
+ snake[0].setPath(snakeLocation);
+ snakeLocation += ConvertUnits.ToSimUnits(-snakeSpeed, 0);
+ snake[0].BodyPart.Position = snakeLocation;
+ }
+ if (up)
+ {
+ if (snake.Count > 1)
+ snake[0].setPath(snakeLocation);
+ snakeLocation += ConvertUnits.ToSimUnits(0, -snakeSpeed);
+ snake[0].BodyPart.Position = snakeLocation;
+ }
+ if (down)
+ {
+ if (snake.Count > 1)
+ snake[0].setPath(snakeLocation);
+ snakeLocation += ConvertUnits.ToSimUnits(0, snakeSpeed);
+ snake[0].BodyPart.Position = snakeLocation;
+ }
+
+ //Border Check
+ if (ConvertUnits.ToDisplayUnits(snake[0].BodyPart.Position.X) > this.ScreenManager.GraphicsDevice.Viewport.Width / 2 || ConvertUnits.ToDisplayUnits(snake[0].BodyPart.Position.Y) > this.ScreenManager.GraphicsDevice.Viewport.Height / 2 || ConvertUnits.ToDisplayUnits(snake[0].BodyPart.Position.X) < (-1 * ( this.ScreenManager.GraphicsDevice.Viewport.Width / 2)) || ConvertUnits.ToDisplayUnits(snake[0].BodyPart.Position.Y) < (-1 * ( this.ScreenManager.GraphicsDevice.Viewport.Height / 2)))
+ resetGame();
+
+ //Code to make the snake follow the same path the head took
+ for (int i = 1; i < snake.Count; i++)
+ {
+
+ snake[i].BodyPart.Position = snake[i - 1].getPath();
+ if((i + 1) != snake.Count)
+ snake[i].setPath(snake[i - 1].getPath());
+
+ if ((((snake[0].getPath().X < snake[i].getPath().X + .7) && (snake[0].getPath().X > snake[i].getPath().X - .7)) && ((snake[0].getPath().Y < snake[i].getPath().Y + .7) && (snake[0].getPath().Y > snake[i].getPath().Y - .7))) && (snake[i].getPath() != defaultSnake))
+ resetGame();
+ else
+ snake[i - 1].removePath();
+ }
+ }
+ }
+
+ }
+}
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snake/axios_snake.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snake/axios_snake.csproj Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,140 @@
+
+
+
+ {15D44C24-299F-40EF-9AE9-7DA117D5AA0B}
+ {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Debug
+ x86
+ WinExe
+ Properties
+ axios_snake
+ axios_snake
+ v4.0
+ Client
+ v4.0
+ Windows
+ Reach
+ ade2d9b7-dbb9-48bc-a588-b933b9042bfc
+ Game
+ Game.ico
+ GameThumbnail.png
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+
+
+ true
+ full
+ false
+ bin\x86\Debug
+ DEBUG;TRACE;WINDOWS
+ prompt
+ 4
+ true
+ false
+ x86
+ false
+
+
+ pdbonly
+ true
+ bin\x86\Release
+ TRACE;WINDOWS
+ prompt
+ 4
+ true
+ false
+ x86
+ true
+
+
+
+ ..\..\Snake\Axios.Windows.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ axios_snakeContent %28Content%29
+ Content
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}
+
+
+
+
+ False
+ Microsoft .NET Framework 4 Client Profile %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+ False
+ Microsoft XNA Framework Redistributable 4.0
+ true
+
+
+
+
+
+
+
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/arrow.png
Binary file axios_snake/axios_snakeContent/Common/arrow.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/buttons.png
Binary file axios_snake/axios_snakeContent/Common/buttons.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/cursor.png
Binary file axios_snake/axios_snakeContent/Common/cursor.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/gradient.png
Binary file axios_snake/axios_snakeContent/Common/gradient.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/logo.png
Binary file axios_snake/axios_snakeContent/Common/logo.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/popup.png
Binary file axios_snake/axios_snakeContent/Common/popup.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/slider.png
Binary file axios_snake/axios_snakeContent/Common/slider.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/socket.png
Binary file axios_snake/axios_snakeContent/Common/socket.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Common/stick.png
Binary file axios_snake/axios_snakeContent/Common/stick.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Fonts/credits.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/Fonts/credits.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+ Calibri
+
+
+ 15
+
+
+ 0
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ ~
+
+
+
+
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Fonts/detailsFont.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/Fonts/detailsFont.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,15 @@
+
+
+
+ Courier New
+ 10
+ 1
+
+
+
+
+ ~
+
+
+
+
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Fonts/frameRateCounterFont.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/Fonts/frameRateCounterFont.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,47 @@
+
+
+
+ Arial
+ 10
+ 2
+
+
+
+ f
+ f
+
+
+ p
+ p
+
+
+ t
+ t
+
+
+ n
+ n
+
+
+ s
+ s
+
+
+ :
+ :
+
+
+
+
+
+
+ 0
+ 9
+
+
+ .
+ .
+
+
+
+
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Fonts/helptext.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/Fonts/helptext.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+ Segoe UI Mono
+
+
+ 8
+
+
+ 0
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ ~
+
+
+
+
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Fonts/menufont.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/Fonts/menufont.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,15 @@
+
+
+
+ Segoe UI Mono
+ 23
+ 2
+
+
+
+
+ ~
+
+
+
+
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Materials/blank.png
Binary file axios_snake/axios_snakeContent/Materials/blank.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Materials/dots.png
Binary file axios_snake/axios_snakeContent/Materials/dots.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Materials/pavement.png
Binary file axios_snake/axios_snakeContent/Materials/pavement.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Materials/squares.png
Binary file axios_snake/axios_snakeContent/Materials/squares.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Materials/waves.png
Binary file axios_snake/axios_snakeContent/Materials/waves.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/alphabet.png
Binary file axios_snake/axios_snakeContent/Samples/alphabet.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/car.png
Binary file axios_snake/axios_snakeContent/Samples/car.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/goo.png
Binary file axios_snake/axios_snakeContent/Samples/goo.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/link.png
Binary file axios_snake/axios_snakeContent/Samples/link.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/object.png
Binary file axios_snake/axios_snakeContent/Samples/object.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/Samples/wheel.png
Binary file axios_snake/axios_snakeContent/Samples/wheel.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/axios_snakeContent.contentproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/axios_snakeContent.contentproj Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,195 @@
+
+
+
+ {664607B5-E371-44CA-A2D0-A7ECF21237A7}
+ {96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Debug
+ x86
+ Library
+ Properties
+ v4.0
+ v4.0
+ bin\$(Platform)\$(Configuration)
+ Content
+
+
+ x86
+
+
+ x86
+
+
+ axios_snakeContent
+
+
+
+
+
+
+
+
+
+
+
+ arrow
+ TextureImporter
+ TextureProcessor
+
+
+ buttons
+ TextureImporter
+ TextureProcessor
+
+
+ cursor
+ TextureImporter
+ TextureProcessor
+
+
+ gradient
+ TextureImporter
+ TextureProcessor
+
+
+ logo
+ TextureImporter
+ TextureProcessor
+
+
+ popup
+ TextureImporter
+ TextureProcessor
+
+
+ slider
+ TextureImporter
+ TextureProcessor
+
+
+ socket
+ TextureImporter
+ TextureProcessor
+
+
+ stick
+ TextureImporter
+ TextureProcessor
+
+
+ blank
+ TextureImporter
+ TextureProcessor
+
+
+ dots
+ TextureImporter
+ TextureProcessor
+
+
+ pavement
+ TextureImporter
+ TextureProcessor
+
+
+ squares
+ TextureImporter
+ TextureProcessor
+
+
+ waves
+ TextureImporter
+ TextureProcessor
+
+
+ alphabet
+ TextureImporter
+ TextureProcessor
+
+
+ car
+ TextureImporter
+ TextureProcessor
+
+
+ goo
+ TextureImporter
+ TextureProcessor
+
+
+ link
+ TextureImporter
+ TextureProcessor
+
+
+ object
+ TextureImporter
+ TextureProcessor
+
+
+ wheel
+ TextureImporter
+ TextureProcessor
+
+
+
+
+ font
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+ credits
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+ detailsFont
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+ frameRateCounterFont
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+ helptext
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+ menufont
+ FontDescriptionImporter
+ FontDescriptionProcessor
+
+
+
+
+ background
+ TextureImporter
+ TextureProcessor
+
+
+
+
+ ball
+ TextureImporter
+ TextureProcessor
+
+
+
+
+ goo
+ TextureImporter
+ TextureProcessor
+
+
+
+
+
\ No newline at end of file
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/background.png
Binary file axios_snake/axios_snakeContent/background.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/ball.png
Binary file axios_snake/axios_snakeContent/ball.png has changed
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/font.spritefont
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/axios_snake/axios_snakeContent/font.spritefont Wed Aug 22 22:03:36 2012 -0500
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+ Arial
+
+
+ 16
+
+
+ 0
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ ~
+
+
+
+
diff -r e6f9ad6d85889f6ff5f137e64b4b7f254e4022b1 -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 axios_snake/axios_snakeContent/goo.png
Binary file axios_snake/axios_snakeContent/goo.png has changed