From 03c31460dc61b572b86d3ca5e16804f2b97cd908 Mon Sep 17 00:00:00 2001
From: Susan Yuen <susan_loves_cheese@hotmail.com>
Date: Mon, 14 Nov 2016 16:45:19 -0500
Subject: [PATCH] Removed player field inside Unit (warrior, archer, mage)

---
 src/Blaze-Brigade/Blaze_Brigade/Archer.cs  |   4 +-
 src/Blaze-Brigade/Blaze_Brigade/Game.cs    | 346 ++++++++++-----------
 src/Blaze-Brigade/Blaze_Brigade/Mage.cs    |   4 +-
 src/Blaze-Brigade/Blaze_Brigade/Warrior.cs |   4 +-
 4 files changed, 174 insertions(+), 184 deletions(-)

diff --git a/src/Blaze-Brigade/Blaze_Brigade/Archer.cs b/src/Blaze-Brigade/Blaze_Brigade/Archer.cs
index 0aa7744..34620c2 100644
--- a/src/Blaze-Brigade/Blaze_Brigade/Archer.cs
+++ b/src/Blaze-Brigade/Blaze_Brigade/Archer.cs
@@ -54,7 +54,6 @@ namespace Model
         private Button[] buttons = new Button[5];   // the buttons associated with the unit
         private Texture2D charInfo, charAttackInfo; // The character and attack info textures
         private int currentFrame;                   // the current frame the sprite is on
-        private int player;                         // which player this unit belongs to
 
         /**
         * The constructor for Unit Warrior
@@ -71,7 +70,7 @@ namespace Model
         */
         public Archer(Texture2D spriteImage, Button attackButton, Button moveButton,
             Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo,
-            Texture2D charAttackInfo, Vector2 coordinates, int player)
+            Texture2D charAttackInfo, Vector2 coordinates)
         {
             this.spriteImage = spriteImage;
             buttons[0] = attackButton;
@@ -81,7 +80,6 @@ namespace Model
             buttons[4] = confirmButton;
             this.charInfo = charInfo;
             this.charAttackInfo = charAttackInfo;
-            this.player = player;
             pixelCoordinates = coordinates;
             int positionX = (int)Math.Round(coordinates.X / 32);
             int positionY = (int)Math.Round(coordinates.Y / 32);
diff --git a/src/Blaze-Brigade/Blaze_Brigade/Game.cs b/src/Blaze-Brigade/Blaze_Brigade/Game.cs
index 9849b27..55b54ec 100644
--- a/src/Blaze-Brigade/Blaze_Brigade/Game.cs
+++ b/src/Blaze-Brigade/Blaze_Brigade/Game.cs
@@ -116,9 +116,10 @@ namespace Controller
 
             // load character sprite and set position
 
-      
-            player1.addUnit(getNewUnit(UnitType.Mage, new Vector2(4 * 32f, 6 * 32f), 1));
-            player2.addUnit(getNewUnit(UnitType.Warrior, new Vector2(8 * 32f, 6 * 32f), 2));
+
+            player1.addUnit(getNewUnit(UnitType.Mage, new Vector2(4 * 32f, 6 * 32f)));
+            player1.addUnit(getNewUnit(UnitType.Warrior, new Vector2(4 * 32f, 10 * 32f)));
+            player2.addUnit(getNewUnit(UnitType.Warrior, new Vector2(8 * 32f, 6 * 32f)));
 
             GameState.currentPlayer = (player1);
             GameState.enemyPlayer = (player2);
@@ -226,7 +227,7 @@ namespace Controller
                 case GameMenuState.Playing: // if true.. load new image...
                     backGround = Content.Load<Texture2D>("Game_Map"); // load background
 
-                    
+
 
                     if (GameFunction.isTurnOver())
                     {
@@ -237,7 +238,7 @@ namespace Controller
                     }
 
                     // removes deceased units in Player 1
-                    foreach(Unit unit in player1.getUnits())
+                    foreach (Unit unit in player1.getUnits())
                     {
                         GameFunction.removeDeceasedUnit(graph, player1, unit);
                         if (GameFunction.isGameOver(player1, player2))
@@ -306,7 +307,7 @@ namespace Controller
                     if (GameState.playableUnitSelected)
                     {
                         Unit unit = GameState.selectedUnit;
-                        
+
                         if (!GameState.isAnimating)
                         {
                             #region Highlight nodes
@@ -325,7 +326,7 @@ namespace Controller
                                 //Debug.WriteLine(attackableNodes.Count());
                                 foreach (Node attack in attackableNodes)
                                 {
-                                    if ((!GameState.moveableNodes.Contains(attack))&&(attack.unitOnNode!=unit)&&(!attack.isObstacle))
+                                    if ((!GameState.moveableNodes.Contains(attack)) && (attack.unitOnNode != unit) && (!attack.isObstacle))
                                     {
                                         spriteBatch.Draw(attackableNode, attack.getPosition(), null, Color.White * 0.2f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.9f);
                                     }
@@ -376,12 +377,12 @@ namespace Controller
 
                                 if (GameState.currentPlayer == player1)
                                 {
-                                    
+
                                     spriteBatch.Draw(unit.getCharAttackInfo(), Vector2.Zero, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charAttackInfoBackground texture for current character
                                     spriteBatch.DrawString(largeFont, damageDealt.ToString(), new Vector2(180, 458), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws damage dealt
-                                    spriteBatch.DrawString(font, " x " +hitCount.ToString(), new Vector2(195, 459), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws hit count
-                                    spriteBatch.DrawString(largeFont, hitRate.ToString()+" %", new Vector2(170, 488), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws hit rate
-                                    spriteBatch.DrawString(largeFont, critRate.ToString()+" %", new Vector2(170, 518), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws crit rate
+                                    spriteBatch.DrawString(font, " x " + hitCount.ToString(), new Vector2(195, 459), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws hit count
+                                    spriteBatch.DrawString(largeFont, hitRate.ToString() + " %", new Vector2(170, 488), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws hit rate
+                                    spriteBatch.DrawString(largeFont, critRate.ToString() + " %", new Vector2(170, 518), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws crit rate
                                     spriteBatch.DrawString(largestFont, unit.Hp.ToString(), new Vector2(342, 475), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws unit health
 
                                     spriteBatch.Draw(attackedUnit.getCharAttackInfo(), attackInfoLocation2, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charAttackInfoBackground for unit being attacked
@@ -400,9 +401,9 @@ namespace Controller
                                 {
                                     spriteBatch.Draw(attackedUnit.getCharAttackInfo(), Vector2.Zero, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charAttackInfoBackground texture for current character
                                     spriteBatch.DrawString(largeFont, damageDealt.ToString(), new Vector2(180, 458), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack damage 
-                                    spriteBatch.DrawString(font, " x " +hitCount.ToString(), new Vector2(195, 459), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack hit count
-                                    spriteBatch.DrawString(largeFont, hitRate.ToString()+" %", new Vector2(170, 488), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack hit rate
-                                    spriteBatch.DrawString(largeFont, critRate.ToString()+" %", new Vector2(170, 518), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack crit rate
+                                    spriteBatch.DrawString(font, " x " + hitCount.ToString(), new Vector2(195, 459), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack hit count
+                                    spriteBatch.DrawString(largeFont, hitRate.ToString() + " %", new Vector2(170, 488), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack hit rate
+                                    spriteBatch.DrawString(largeFont, critRate.ToString() + " %", new Vector2(170, 518), Color.DarkBlue, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws counterattack crit rate
                                     spriteBatch.DrawString(largestFont, attackedUnit.Hp.ToString(), new Vector2(342, 475), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); //draws enemy unit health
 
                                     spriteBatch.Draw(unit.getCharAttackInfo(), attackInfoLocation2, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.7f); //draw charAttackInfoBackground for current character
@@ -425,7 +426,7 @@ namespace Controller
                         #region Character Info Screen player1
 
                         //if player 1, prints info screen for player 1
-                        if ((GameState.currentPlayer == player1)&&(!GameState.attackConfirmOpen))
+                        if ((GameState.currentPlayer == player1) && (!GameState.attackConfirmOpen))
                         {
                             Vector2 statLocation = new Vector2(170, 535); //starting location for first stat
                             Vector2 statLocation2 = new Vector2(235, 535); //starting location for first stat
@@ -435,12 +436,12 @@ namespace Controller
 
                             for (int k = 0; k < 4; k++) //for stats - level, str, int, skill,
                             {
-                                spriteBatch.DrawString(font, stats[k].ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); 
+                                spriteBatch.DrawString(font, stats[k].ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f);
                                 statLocation = statLocation + increment; //increment downwards
                             }
                             for (int t = 4; t < 7; t++) //for stats - speed, defense, resistance 
                             {
-                                spriteBatch.DrawString(font, stats[t].ToString(), statLocation2, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); 
+                                spriteBatch.DrawString(font, stats[t].ToString(), statLocation2, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f);
                                 statLocation2 = statLocation2 + increment; //increment downwards
                             }
 
@@ -452,20 +453,20 @@ namespace Controller
                         {
                             if (!GameState.attackConfirmOpen)
                             {
-                            Vector2 statLocation = new Vector2(795, 533); //starting location for first stat
-                            Vector2 statLocation2 = new Vector2(860, 533); //starting location for first stat
-                            Vector2 increment = new Vector2(0, 20); //increment downwards for each stat
-                            Vector2 infoLocation = new Vector2(635, 513);
-                            int[] stats = unit.getStats();
+                                Vector2 statLocation = new Vector2(795, 533); //starting location for first stat
+                                Vector2 statLocation2 = new Vector2(860, 533); //starting location for first stat
+                                Vector2 increment = new Vector2(0, 20); //increment downwards for each stat
+                                Vector2 infoLocation = new Vector2(635, 513);
+                                int[] stats = unit.getStats();
 
                                 for (int k = 0; k < 4; k++) //for stats - level, str, int, skill,
                                 {
-                                    spriteBatch.DrawString(font, stats[k].ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); 
+                                    spriteBatch.DrawString(font, stats[k].ToString(), statLocation, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f);
                                     statLocation = statLocation + increment; //increment downwards
                                 }
                                 for (int t = 4; t < 7; t++) //for stats - speed, defense, resistance 
                                 {
-                                    spriteBatch.DrawString(font, stats[t].ToString(), statLocation2, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f); 
+                                    spriteBatch.DrawString(font, stats[t].ToString(), statLocation2, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.6f);
                                     statLocation2 = statLocation2 + increment; //increment downwards
                                 }
 
@@ -482,7 +483,7 @@ namespace Controller
                     if (GameState.gameOver)
                     {
                         Vector2 gameOverLocation = new Vector2(-370, -300);
-                        spriteBatch.DrawString(largestFont,"Game Over", new Vector2(350, 200), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0f); //draws Game Over Text
+                        spriteBatch.DrawString(largestFont, "Game Over", new Vector2(350, 200), Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 0f); //draws Game Over Text
                         spriteBatch.Draw(gameOver, Vector2.Zero, null, Color.White, 0, gameOverLocation, 1f, SpriteEffects.None, 0f);
                         spriteBatch.Draw(backGround, Vector2.Zero, null, Color.Black * 0.5f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.9f);
 
@@ -494,7 +495,7 @@ namespace Controller
                             if (unit.Alive)
                             {
                                 spriteBatch.Draw(unit.getSpriteImage(), unit.PixelCoordinates,
-                                    unit.getCurrentFrame(), Color.Black*0.5f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
+                                    unit.getCurrentFrame(), Color.Black * 0.5f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
                             }
                         }
                         #endregion
@@ -507,7 +508,7 @@ namespace Controller
                             if (unit.Alive)
                             {
                                 spriteBatch.Draw(unit.getSpriteImage(), unit.PixelCoordinates,
-                                    unit.getCurrentFrame(), Color.Black*0.5f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
+                                    unit.getCurrentFrame(), Color.Black * 0.5f, 0, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
                             }
                         }
                         #endregion
@@ -516,7 +517,7 @@ namespace Controller
 
                     spriteBatch.Draw(backGround, Vector2.Zero, null, Color.White, 0, Vector2.Zero, 1f, SpriteEffects.None, 1);
 
-                    
+
 
                     break;
             }
@@ -527,7 +528,7 @@ namespace Controller
 
         private static bool findAttackType(Unit unit1)
         {
-            if ((unit1.getClass() == UnitType.Warrior)|| (unit1.getClass() == UnitType.Archer))
+            if ((unit1.getClass() == UnitType.Warrior) || (unit1.getClass() == UnitType.Archer))
             {
                 return false;
             }
@@ -538,7 +539,7 @@ namespace Controller
         }
 
         //method to return a unit: takes in unit type (warrior/mage/ranger), unit position, and which player's unit (since different model/colors)
-        private Unit getNewUnit(UnitType unitType, Vector2 unitPosition, int player)
+        private Unit getNewUnit(UnitType unitType, Vector2 unitPosition)
         {
             Button attackButton = new Button(ButtonType.Attack, unitPosition, Content.Load<Texture2D>("attack"));
             Button moveButton = new Button(ButtonType.Move, unitPosition, Content.Load<Texture2D>("move"));
@@ -546,29 +547,24 @@ namespace Controller
             Button waitButton = new Button(ButtonType.Wait, unitPosition, Content.Load<Texture2D>("wait")); ;
             Button attackConfirmButton = new Button(ButtonType.AttackConfirm, new Vector2(328, 130), Content.Load<Texture2D>("confirm_attack"));
 
-            if (player == 1)
+            if (unitType == UnitType.Mage)
             {
-                if (unitType == UnitType.Mage)
-                {
-                    Unit unit = new Mage(Content.Load<Texture2D>("mage"), attackButton, moveButton,
-                        itemButton, waitButton, attackConfirmButton, Content.Load<Texture2D>("mage_stats"), Content.Load<Texture2D>("mage_attack"), unitPosition, 1);
-                    Weapon startingWeap = new BronzeBow();
-                    unit.equippedWeapon = startingWeap;
-                    graph.getNode(unitPosition).unitOnNode = (unit);
-                    return unit;
-                }
+                Unit unit = new Mage(Content.Load<Texture2D>("mage"), attackButton, moveButton,
+                    itemButton, waitButton, attackConfirmButton, Content.Load<Texture2D>("mage_stats"), Content.Load<Texture2D>("mage_attack"), unitPosition);
+                Weapon startingWeap = new BronzeBow();
+                unit.equippedWeapon = startingWeap;
+                graph.getNode(unitPosition).unitOnNode = (unit);
+                return unit;
             }
-            else
+
+            if (unitType == UnitType.Warrior)
             {
-                if (unitType == UnitType.Warrior)
-                {
-                    Unit unit = new Warrior(Content.Load<Texture2D>("2warrior"), attackButton, moveButton,
-                        itemButton, waitButton, attackConfirmButton, Content.Load<Texture2D>("2warrior_stats"), Content.Load<Texture2D>("2warrior_attack"), unitPosition, 2);
-                    Weapon startingWeap = new BronzeBow();
-                    unit.equippedWeapon = startingWeap;
-                    graph.getNode(unitPosition).unitOnNode = (unit);
-                    return unit;
-                }
+                Unit unit = new Warrior(Content.Load<Texture2D>("2warrior"), attackButton, moveButton,
+                    itemButton, waitButton, attackConfirmButton, Content.Load<Texture2D>("2warrior_stats"), Content.Load<Texture2D>("2warrior_attack"), unitPosition);
+                Weapon startingWeap = new BronzeBow();
+                unit.equippedWeapon = startingWeap;
+                graph.getNode(unitPosition).unitOnNode = (unit);
+                return unit;
             }
 
             return null;
@@ -579,156 +575,156 @@ namespace Controller
         {
             for (int y = 5; y <= 14; y++)
             {
-                graph.getNode(2, y).isObstacle=(true);
+                graph.getNode(2, y).isObstacle = (true);
             }
-            graph.getNode(3, 5).isObstacle=(true);
-            graph.getNode(3, 13).isObstacle=(true);
-            graph.getNode(4, 3).isObstacle=(true);
-            graph.getNode(4, 4).isObstacle=(true);
-            graph.getNode(4, 13).isObstacle=(true);
-            graph.getNode(4, 14).isObstacle=(true);
-            graph.getNode(5, 2).isObstacle=(true);
-            graph.getNode(5, 15).isObstacle=(true);
-            graph.getNode(6, 2).isObstacle=(true);
-            graph.getNode(6, 14).isObstacle=(true);
-            graph.getNode(7, 2).isObstacle=(true);
-            graph.getNode(7, 3).isObstacle=(true);
-            graph.getNode(7, 4).isObstacle=(true);
-            graph.getNode(7, 14).isObstacle=(true);
-            graph.getNode(8, 4).isObstacle=(true);
+            graph.getNode(3, 5).isObstacle = (true);
+            graph.getNode(3, 13).isObstacle = (true);
+            graph.getNode(4, 3).isObstacle = (true);
+            graph.getNode(4, 4).isObstacle = (true);
+            graph.getNode(4, 13).isObstacle = (true);
+            graph.getNode(4, 14).isObstacle = (true);
+            graph.getNode(5, 2).isObstacle = (true);
+            graph.getNode(5, 15).isObstacle = (true);
+            graph.getNode(6, 2).isObstacle = (true);
+            graph.getNode(6, 14).isObstacle = (true);
+            graph.getNode(7, 2).isObstacle = (true);
+            graph.getNode(7, 3).isObstacle = (true);
+            graph.getNode(7, 4).isObstacle = (true);
+            graph.getNode(7, 14).isObstacle = (true);
+            graph.getNode(8, 4).isObstacle = (true);
             for (int y = 14; y <= 17; y++)
             {
-                graph.getNode(8, y).isObstacle=(true);
+                graph.getNode(8, y).isObstacle = (true);
             }
-            graph.getNode(9, 4).isObstacle=(true);
+            graph.getNode(9, 4).isObstacle = (true);
             for (int y = 17; y <= 20; y++)
             {
-                graph.getNode(9, y).isObstacle=(true);
+                graph.getNode(9, y).isObstacle = (true);
             }
-            graph.getNode(10, 4).isObstacle=(true);
-            graph.getNode(10, 20).isObstacle=(true);
-            graph.getNode(10, 21).isObstacle=(true);
-            graph.getNode(10, 22).isObstacle=(true);
-            graph.getNode(11, 4).isObstacle=(true);
-            graph.getNode(11, 14).isObstacle=(true);
-            graph.getNode(11, 22).isObstacle=(true);
-            graph.getNode(12, 3).isObstacle=(true);
+            graph.getNode(10, 4).isObstacle = (true);
+            graph.getNode(10, 20).isObstacle = (true);
+            graph.getNode(10, 21).isObstacle = (true);
+            graph.getNode(10, 22).isObstacle = (true);
+            graph.getNode(11, 4).isObstacle = (true);
+            graph.getNode(11, 14).isObstacle = (true);
+            graph.getNode(11, 22).isObstacle = (true);
+            graph.getNode(12, 3).isObstacle = (true);
             for (int y = 22; y <= 25; y++)
             {
-                graph.getNode(12, y).isObstacle=(true);
+                graph.getNode(12, y).isObstacle = (true);
             }
-            graph.getNode(13, 4).isObstacle=(true);
-            graph.getNode(12, 25).isObstacle=(true);
-            graph.getNode(14, 4).isObstacle=(true);
-            graph.getNode(14, 25).isObstacle=(true);
-            graph.getNode(15, 4).isObstacle=(true);
-            graph.getNode(15, 25).isObstacle=(true);
-            graph.getNode(15, 26).isObstacle=(true);
-            graph.getNode(15, 27).isObstacle=(true);
-            graph.getNode(16, 3).isObstacle=(true);
-            graph.getNode(16, 27).isObstacle=(true);
-            graph.getNode(17, 2).isObstacle=(true);
-            graph.getNode(17, 3).isObstacle=(true);
-            graph.getNode(17, 27).isObstacle=(true);
-            graph.getNode(18, 1).isObstacle=(true);
-            graph.getNode(18, 27).isObstacle=(true);
-            graph.getNode(19, 1).isObstacle=(true);
-            graph.getNode(19, 27).isObstacle=(true);
-            graph.getNode(20, 2).isObstacle=(true);
+            graph.getNode(13, 4).isObstacle = (true);
+            graph.getNode(12, 25).isObstacle = (true);
+            graph.getNode(14, 4).isObstacle = (true);
+            graph.getNode(14, 25).isObstacle = (true);
+            graph.getNode(15, 4).isObstacle = (true);
+            graph.getNode(15, 25).isObstacle = (true);
+            graph.getNode(15, 26).isObstacle = (true);
+            graph.getNode(15, 27).isObstacle = (true);
+            graph.getNode(16, 3).isObstacle = (true);
+            graph.getNode(16, 27).isObstacle = (true);
+            graph.getNode(17, 2).isObstacle = (true);
+            graph.getNode(17, 3).isObstacle = (true);
+            graph.getNode(17, 27).isObstacle = (true);
+            graph.getNode(18, 1).isObstacle = (true);
+            graph.getNode(18, 27).isObstacle = (true);
+            graph.getNode(19, 1).isObstacle = (true);
+            graph.getNode(19, 27).isObstacle = (true);
+            graph.getNode(20, 2).isObstacle = (true);
             for (int y = 24; y <= 27; y++)
             {
-                graph.getNode(20, y).isObstacle=(true);
+                graph.getNode(20, y).isObstacle = (true);
             }
-            graph.getNode(21, 2).isObstacle=(true);
-            graph.getNode(21, 21).isObstacle=(true);
-            graph.getNode(21, 22).isObstacle=(true);
-            graph.getNode(21, 23).isObstacle=(true);
-            graph.getNode(22, 1).isObstacle=(true);
-            graph.getNode(22, 2).isObstacle=(true);
-            graph.getNode(22, 20).isObstacle=(true);
-            graph.getNode(23, 0).isObstacle=(true);
-            graph.getNode(23, 20).isObstacle=(true);
-            graph.getNode(24, 0).isObstacle=(true);
-            graph.getNode(24, 20).isObstacle=(true);
-            graph.getNode(25, 1).isObstacle=(true);
-            graph.getNode(25, 20).isObstacle=(true);
-            graph.getNode(26, 1).isObstacle=(true);
-            graph.getNode(26, 21).isObstacle=(true);
-            graph.getNode(27, 1).isObstacle=(true);
-            graph.getNode(27, 22).isObstacle=(true);
-            graph.getNode(28, 0).isObstacle=(true);
+            graph.getNode(21, 2).isObstacle = (true);
+            graph.getNode(21, 21).isObstacle = (true);
+            graph.getNode(21, 22).isObstacle = (true);
+            graph.getNode(21, 23).isObstacle = (true);
+            graph.getNode(22, 1).isObstacle = (true);
+            graph.getNode(22, 2).isObstacle = (true);
+            graph.getNode(22, 20).isObstacle = (true);
+            graph.getNode(23, 0).isObstacle = (true);
+            graph.getNode(23, 20).isObstacle = (true);
+            graph.getNode(24, 0).isObstacle = (true);
+            graph.getNode(24, 20).isObstacle = (true);
+            graph.getNode(25, 1).isObstacle = (true);
+            graph.getNode(25, 20).isObstacle = (true);
+            graph.getNode(26, 1).isObstacle = (true);
+            graph.getNode(26, 21).isObstacle = (true);
+            graph.getNode(27, 1).isObstacle = (true);
+            graph.getNode(27, 22).isObstacle = (true);
+            graph.getNode(28, 0).isObstacle = (true);
             for (int y = 22; y <= 27; y++)
             {
-                graph.getNode(28, y).isObstacle=(true);
+                graph.getNode(28, y).isObstacle = (true);
             }
-            graph.getNode(29, 1).isObstacle=(true);
-            graph.getNode(29, 2).isObstacle=(true);
-            graph.getNode(29, 3).isObstacle=(true);
-            graph.getNode(29, 27).isObstacle=(true);
-            graph.getNode(30, 3).isObstacle=(true);
-            graph.getNode(30, 27).isObstacle=(true);
-            graph.getNode(31, 2).isObstacle=(true);
-            graph.getNode(31, 3).isObstacle=(true);
-            graph.getNode(31, 27).isObstacle=(true);
-            graph.getNode(32, 27).isObstacle=(true);
-            graph.getNode(33, 2).isObstacle=(true);
-            graph.getNode(33, 3).isObstacle=(true);
-            graph.getNode(33, 26).isObstacle=(true);
-            graph.getNode(34, 3).isObstacle=(true);
-            graph.getNode(34, 25).isObstacle=(true);
-            graph.getNode(35, 3).isObstacle=(true);
-            graph.getNode(35, 25).isObstacle=(true);
-            graph.getNode(36, 2).isObstacle=(true);
-            graph.getNode(36, 25).isObstacle=(true);
-            graph.getNode(37, 2).isObstacle=(true);
-            graph.getNode(37, 25).isObstacle=(true);
-            graph.getNode(38, 2).isObstacle=(true);
+            graph.getNode(29, 1).isObstacle = (true);
+            graph.getNode(29, 2).isObstacle = (true);
+            graph.getNode(29, 3).isObstacle = (true);
+            graph.getNode(29, 27).isObstacle = (true);
+            graph.getNode(30, 3).isObstacle = (true);
+            graph.getNode(30, 27).isObstacle = (true);
+            graph.getNode(31, 2).isObstacle = (true);
+            graph.getNode(31, 3).isObstacle = (true);
+            graph.getNode(31, 27).isObstacle = (true);
+            graph.getNode(32, 27).isObstacle = (true);
+            graph.getNode(33, 2).isObstacle = (true);
+            graph.getNode(33, 3).isObstacle = (true);
+            graph.getNode(33, 26).isObstacle = (true);
+            graph.getNode(34, 3).isObstacle = (true);
+            graph.getNode(34, 25).isObstacle = (true);
+            graph.getNode(35, 3).isObstacle = (true);
+            graph.getNode(35, 25).isObstacle = (true);
+            graph.getNode(36, 2).isObstacle = (true);
+            graph.getNode(36, 25).isObstacle = (true);
+            graph.getNode(37, 2).isObstacle = (true);
+            graph.getNode(37, 25).isObstacle = (true);
+            graph.getNode(38, 2).isObstacle = (true);
             for (int y = 9; y <= 14; y++)
             {
-                graph.getNode(38, y).isObstacle=(true);
+                graph.getNode(38, y).isObstacle = (true);
             }
-            graph.getNode(38, 26).isObstacle=(true);
-            graph.getNode(39, 2).isObstacle=(true);
-            graph.getNode(39, 8).isObstacle=(true);
-            graph.getNode(39, 14).isObstacle=(true);
-            graph.getNode(40, 3).isObstacle=(true);
-            graph.getNode(40, 7).isObstacle=(true);
-            graph.getNode(40, 14).isObstacle=(true);
-            graph.getNode(40, 26).isObstacle=(true);
-            graph.getNode(41, 3).isObstacle=(true);
-            graph.getNode(41, 7).isObstacle=(true);
+            graph.getNode(38, 26).isObstacle = (true);
+            graph.getNode(39, 2).isObstacle = (true);
+            graph.getNode(39, 8).isObstacle = (true);
+            graph.getNode(39, 14).isObstacle = (true);
+            graph.getNode(40, 3).isObstacle = (true);
+            graph.getNode(40, 7).isObstacle = (true);
+            graph.getNode(40, 14).isObstacle = (true);
+            graph.getNode(40, 26).isObstacle = (true);
+            graph.getNode(41, 3).isObstacle = (true);
+            graph.getNode(41, 7).isObstacle = (true);
             for (int y = 14; y <= 17; y++)
             {
-                graph.getNode(41, y).isObstacle=(true);
+                graph.getNode(41, y).isObstacle = (true);
             }
-            graph.getNode(41, 27).isObstacle=(true);
-            graph.getNode(42, 4).isObstacle=(true);
-            graph.getNode(42, 7).isObstacle=(true);
-            graph.getNode(42, 17).isObstacle=(true);
-            graph.getNode(42, 27).isObstacle=(true);
-            graph.getNode(43, 4).isObstacle=(true);
-            graph.getNode(43, 7).isObstacle=(true);
-            graph.getNode(43, 17).isObstacle=(true);
-            graph.getNode(43, 27).isObstacle=(true);
-            graph.getNode(44, 4).isObstacle=(true);
-            graph.getNode(44, 7).isObstacle=(true);
+            graph.getNode(41, 27).isObstacle = (true);
+            graph.getNode(42, 4).isObstacle = (true);
+            graph.getNode(42, 7).isObstacle = (true);
+            graph.getNode(42, 17).isObstacle = (true);
+            graph.getNode(42, 27).isObstacle = (true);
+            graph.getNode(43, 4).isObstacle = (true);
+            graph.getNode(43, 7).isObstacle = (true);
+            graph.getNode(43, 17).isObstacle = (true);
+            graph.getNode(43, 27).isObstacle = (true);
+            graph.getNode(44, 4).isObstacle = (true);
+            graph.getNode(44, 7).isObstacle = (true);
             for (int y = 17; y <= 23; y++)
             {
-                graph.getNode(44, y).isObstacle=(true);
+                graph.getNode(44, y).isObstacle = (true);
             }
-            graph.getNode(44, 27).isObstacle=(true);
-            graph.getNode(45, 4).isObstacle=(true);
-            graph.getNode(45, 5).isObstacle=(true);
-            graph.getNode(45, 24).isObstacle=(true);
-            graph.getNode(45, 25).isObstacle=(true);
-            graph.getNode(45, 27).isObstacle=(true);
-            graph.getNode(46, 5).isObstacle=(true);
-            graph.getNode(46, 7).isObstacle=(true);
-            graph.getNode(46, 25).isObstacle=(true);
-            graph.getNode(46, 26).isObstacle=(true);
-            graph.getNode(47, 5).isObstacle=(true);
-            graph.getNode(47, 6).isObstacle=(true);
-            graph.getNode(47, 7).isObstacle=(true);
+            graph.getNode(44, 27).isObstacle = (true);
+            graph.getNode(45, 4).isObstacle = (true);
+            graph.getNode(45, 5).isObstacle = (true);
+            graph.getNode(45, 24).isObstacle = (true);
+            graph.getNode(45, 25).isObstacle = (true);
+            graph.getNode(45, 27).isObstacle = (true);
+            graph.getNode(46, 5).isObstacle = (true);
+            graph.getNode(46, 7).isObstacle = (true);
+            graph.getNode(46, 25).isObstacle = (true);
+            graph.getNode(46, 26).isObstacle = (true);
+            graph.getNode(47, 5).isObstacle = (true);
+            graph.getNode(47, 6).isObstacle = (true);
+            graph.getNode(47, 7).isObstacle = (true);
         }
     }
 }
diff --git a/src/Blaze-Brigade/Blaze_Brigade/Mage.cs b/src/Blaze-Brigade/Blaze_Brigade/Mage.cs
index ea52ee3..b89bb74 100644
--- a/src/Blaze-Brigade/Blaze_Brigade/Mage.cs
+++ b/src/Blaze-Brigade/Blaze_Brigade/Mage.cs
@@ -54,7 +54,6 @@ namespace Model
         private Button[] buttons = new Button[5];   // the buttons associated with the unit
         private Texture2D charInfo, charAttackInfo; // The character and attack info textures
         private int currentFrame;                   // the current frame the sprite is on
-        private int player;                         // which player this unit belongs to
 
         /**
         * The constructor for Unit Mage
@@ -71,7 +70,7 @@ namespace Model
         */
         public Mage(Texture2D spriteImage, Button attackButton, Button moveButton,
             Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo,
-            Texture2D charAttackInfo, Vector2 coordinates, int player)
+            Texture2D charAttackInfo, Vector2 coordinates)
         {
             this.spriteImage = spriteImage;
             buttons[0] = attackButton;
@@ -81,7 +80,6 @@ namespace Model
             buttons[4] = confirmButton;
             this.charInfo = charInfo;
             this.charAttackInfo = charAttackInfo;
-            this.player = player;
             pixelCoordinates = coordinates;
             int positionX = (int)Math.Round(coordinates.X / 32);
             int positionY = (int)Math.Round(coordinates.Y / 32);
diff --git a/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs b/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs
index 4a4a207..8ccaf3e 100644
--- a/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs
+++ b/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs
@@ -55,7 +55,6 @@ namespace Model
         private Button[] buttons = new Button[5];   // the buttons associated with the unit
         private Texture2D charInfo, charAttackInfo; // The character and attack info textures
         private int currentFrame;                   // the current frame the sprite is on
-        private int player;                         // which player this unit belongs to
 
         /**
         * The constructor for Unit Warrior
@@ -72,7 +71,7 @@ namespace Model
         */
         public Warrior(Texture2D spriteImage, Button attackButton, Button moveButton,
             Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo, 
-            Texture2D charAttackInfo, Vector2 coordinates, int player)
+            Texture2D charAttackInfo, Vector2 coordinates)
         {
             this.spriteImage = spriteImage;
             buttons[0] = attackButton;
@@ -82,7 +81,6 @@ namespace Model
             buttons[4] = confirmButton;
             this.charInfo = charInfo;
             this.charAttackInfo = charAttackInfo;
-            this.player = player;
             pixelCoordinates = coordinates;
             int positionX = (int)Math.Round(coordinates.X / 32);
             int positionY = (int)Math.Round(coordinates.Y / 32);
-- 
GitLab