From 5794f9937a2336338a6f14a37405f08a9fc572f5 Mon Sep 17 00:00:00 2001 From: Susan Yuen <susan_loves_cheese@hotmail.com> Date: Sat, 3 Dec 2016 11:34:48 -0500 Subject: [PATCH] Changed all classes to public to allow test project access --- src/Blaze-Brigade/Blaze_Brigade/Animation.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Archer.cs | 2 +- .../Blaze_Brigade/BronzeSword.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Button.cs | 4 ++-- src/Blaze-Brigade/Blaze_Brigade/Camera.cs | 2 +- .../Blaze_Brigade/DamageCalculations.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/FireBall.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/FireBlast.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Game.cs | 2 +- .../Blaze_Brigade/GameFunction.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/GameState.cs | 6 +++--- src/Blaze-Brigade/Blaze_Brigade/Graph.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/IronSword.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/LongBow.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Mage.cs | 2 +- .../Blaze_Brigade/MouseHandler.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Node.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Player.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/RunProgram.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/ShortBow.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Sounds.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Unit.cs | 6 +++--- src/Blaze-Brigade/Blaze_Brigade/Warrior.cs | 2 +- src/Blaze-Brigade/Blaze_Brigade/Weapon.cs | 4 ++-- src/BlazeBrigadeTest/GameFunctionTest.cs | 10 +++++----- ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6405 -> 6663 bytes 27 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Blaze-Brigade/Blaze_Brigade/Animation.cs b/src/Blaze-Brigade/Blaze_Brigade/Animation.cs index ae26227..0085856 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Animation.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Animation.cs @@ -7,7 +7,7 @@ namespace View /// <summary> /// Static class containing all animation methods /// </summary> - class Animation + public class Animation { /** Animates attack of unit in specified direction. The animation consists of moving 10 pixels towards that direction, then moving back to original location. diff --git a/src/Blaze-Brigade/Blaze_Brigade/Archer.cs b/src/Blaze-Brigade/Blaze_Brigade/Archer.cs index 435b219..4e9f57b 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Archer.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Archer.cs @@ -10,7 +10,7 @@ namespace Model /// The Archer model class, extends Unit /// This unit has a high skill and speed, and excels in dealing accurate ranged, high critical, physical attacks, but suffers from overall defense against physical attacks. /// </summary> - class Archer : Unit + public class Archer : Unit { /** Sets and returns whether or not unit is alive diff --git a/src/Blaze-Brigade/Blaze_Brigade/BronzeSword.cs b/src/Blaze-Brigade/Blaze_Brigade/BronzeSword.cs index a6adee6..ee673db 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/BronzeSword.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/BronzeSword.cs @@ -8,7 +8,7 @@ * This class represents a melee weapon. * It implements the Weapon interface. */ - class BronzeSword : Weapon + public class BronzeSword : Weapon { private weaponType weapType; // weapon type diff --git a/src/Blaze-Brigade/Blaze_Brigade/Button.cs b/src/Blaze-Brigade/Blaze_Brigade/Button.cs index fae65fb..9ade653 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Button.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Button.cs @@ -8,7 +8,7 @@ namespace View /// <summary> /// Buttons for the drop down menu buttons when selecting units /// </summary> - class Button + public class Button { private ButtonType buttonType; // holds the button type private Vector2 pixelCoordinates; // holds the coordinates of the menu button in question @@ -100,7 +100,7 @@ namespace View /** Enumerated list for the possible button types */ - enum ButtonType + public enum ButtonType { Attack, AttackConfirm, diff --git a/src/Blaze-Brigade/Blaze_Brigade/Camera.cs b/src/Blaze-Brigade/Blaze_Brigade/Camera.cs index c294a6d..2ab7c74 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Camera.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Camera.cs @@ -5,7 +5,7 @@ namespace View /// <summary> /// Camera class for making the scrollable camera /// </summary> - class Camera + public class Camera { /** Sets and gets the camera position. diff --git a/src/Blaze-Brigade/Blaze_Brigade/DamageCalculations.cs b/src/Blaze-Brigade/Blaze_Brigade/DamageCalculations.cs index 99c9f0f..9ba2614 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/DamageCalculations.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/DamageCalculations.cs @@ -5,7 +5,7 @@ namespace Model /// <summary> /// This class calculates all damage related calculations /// </summary> - static class DamageCalculations + public static class DamageCalculations { /** passes in the 2 units, and a boolean on whether attack is physical (false). Damage is then calculated by taking attacker's Str/int, diff --git a/src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs b/src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs index 8298226..e1c511a 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs @@ -10,7 +10,7 @@ namespace View /// <summary> /// Draw Class containing all the different draw methods /// </summary> - static class DrawClass + public static class DrawClass { /** Draw unit sprites, by taking in spriteBatch, and the Player who's units are to be drawn along with their healthbar. All the player's units will diff --git a/src/Blaze-Brigade/Blaze_Brigade/FireBall.cs b/src/Blaze-Brigade/Blaze_Brigade/FireBall.cs index 4ff9774..56db58a 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/FireBall.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/FireBall.cs @@ -8,7 +8,7 @@ * This class represents a magic based weapon. * It implements the Weapon interface. */ - class Fireball : Weapon + public class Fireball : Weapon { private weaponType weapType; diff --git a/src/Blaze-Brigade/Blaze_Brigade/FireBlast.cs b/src/Blaze-Brigade/Blaze_Brigade/FireBlast.cs index 5a16e29..b599cdc 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/FireBlast.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/FireBlast.cs @@ -8,7 +8,7 @@ * This class represents a magic based weapon. * It implements the Weapon interface. */ - class Fireblast : Weapon + public class Fireblast : Weapon { private weaponType weapType; diff --git a/src/Blaze-Brigade/Blaze_Brigade/Game.cs b/src/Blaze-Brigade/Blaze_Brigade/Game.cs index 813340f..f802320 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Game.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Game.cs @@ -484,7 +484,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, Player player) + public Unit getNewUnit(UnitType unitType, Vector2 unitPosition, Player player) { Button[] unitButtons = new Button[9]; unitButtons[0] = new Button(ButtonType.Attack, unitPosition, Content.Load<Texture2D>("attack")); diff --git a/src/Blaze-Brigade/Blaze_Brigade/GameFunction.cs b/src/Blaze-Brigade/Blaze_Brigade/GameFunction.cs index 997c2e8..d5840b9 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/GameFunction.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/GameFunction.cs @@ -16,7 +16,7 @@ namespace Controller /** * This class holds useable functions in the scope of the entire gameplay. Such functions include updates to the Model. This is done through updating of the GameState or parameters passed into a function. */ - static class GameFunction + public static class GameFunction { /** Returns a boolean value indicating whether or not the specified enemy unit is within attack range of the specified unit. \n\n diff --git a/src/Blaze-Brigade/Blaze_Brigade/GameState.cs b/src/Blaze-Brigade/Blaze_Brigade/GameState.cs index 4e2115e..4d18dc4 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/GameState.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/GameState.cs @@ -7,7 +7,7 @@ namespace Model /// <summary> /// This class holds states in the scope of the entire gameplay /// </summary> - static class GameState + public static class GameState { public static readonly int SCREEN_HEIGHT = 640; public static readonly int SCREEN_WIDTH = 960; @@ -171,7 +171,7 @@ namespace Model /** enumerated list for different possible Game States */ - enum GameMenuState + public enum GameMenuState { MainMenu, // menu screen HowToPlay, // Instruction Screen 1 @@ -182,7 +182,7 @@ namespace Model /** enumerated list for what the current turn state is (per unit) */ - enum TurnState + public enum TurnState { Wait, AttackMenu, diff --git a/src/Blaze-Brigade/Blaze_Brigade/Graph.cs b/src/Blaze-Brigade/Blaze_Brigade/Graph.cs index a64f55b..15e6284 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Graph.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Graph.cs @@ -11,7 +11,7 @@ namespace Model * Programmatical representation of the map grid. * Composed of Nodes that represent each tile on the grid. */ - class Graph + public class Graph { private Node[,] nodes; diff --git a/src/Blaze-Brigade/Blaze_Brigade/IronSword.cs b/src/Blaze-Brigade/Blaze_Brigade/IronSword.cs index d0aecac..1ef7f44 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/IronSword.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/IronSword.cs @@ -8,7 +8,7 @@ * This class represents a melee weapon. * It implements the Weapon interface. */ - class IronSword : Weapon + public class IronSword : Weapon { private weaponType weapType; diff --git a/src/Blaze-Brigade/Blaze_Brigade/LongBow.cs b/src/Blaze-Brigade/Blaze_Brigade/LongBow.cs index 115c244..0747fd0 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/LongBow.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/LongBow.cs @@ -8,7 +8,7 @@ * This class represents a ranged weapon. * It implements the Weapon interface. */ - class LongBow : Weapon + public class LongBow : Weapon { private weaponType weapType; diff --git a/src/Blaze-Brigade/Blaze_Brigade/Mage.cs b/src/Blaze-Brigade/Blaze_Brigade/Mage.cs index 86e4de9..b7b814f 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Mage.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Mage.cs @@ -10,7 +10,7 @@ namespace Model /// The Mage model class, extends Unit /// \n This Unit has strong magical capabilities, and is capable of powerful ranged magic attacks, but makes up with poor physical stats /// </summary> - class Mage : Unit + public class Mage : Unit { /** Sets and returns whether or not unit is alive diff --git a/src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs b/src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs index f1ee922..3d79b43 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/MouseHandler.cs @@ -17,7 +17,7 @@ namespace Controller * Additionally, it updates GameState (in the Model) in order to reflect an update in the game's current status based upon specific conditions in addition to mouse input. \n * All of the mouse handling is done within one function, the updateMouse() function, as mouse handling only consists of checking conditionals to perform calls to the GameFunction (which performs further actions) or an update in the GameState. */ - static class MouseHandler + public static class MouseHandler { private static MouseState lastMouseState; // this state allows for detection of a single click (not click and hold) private static MouseState currentMouseState; diff --git a/src/Blaze-Brigade/Blaze_Brigade/Node.cs b/src/Blaze-Brigade/Blaze_Brigade/Node.cs index bfd60d0..b92cedc 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Node.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Node.cs @@ -10,7 +10,7 @@ namespace Model * Programmatical representation of a tile on the map grid. * Holds information pertaining to the tile. */ - class Node + public class Node { /** Index for hindrance of the movability of a unit. diff --git a/src/Blaze-Brigade/Blaze_Brigade/Player.cs b/src/Blaze-Brigade/Blaze_Brigade/Player.cs index f940d2e..f43cd2a 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Player.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Player.cs @@ -9,7 +9,7 @@ namespace Model /** * Holds information pertaining to a Player in the game. */ - class Player + public class Player { private LinkedList<Unit> ownedUnits; // units that the player owns // if a unit dies, REMOVE from this list and put into a "dead" pile. diff --git a/src/Blaze-Brigade/Blaze_Brigade/RunProgram.cs b/src/Blaze-Brigade/Blaze_Brigade/RunProgram.cs index 8d79a95..eee29b8 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/RunProgram.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/RunProgram.cs @@ -3,7 +3,7 @@ using System; namespace Controller { #if WINDOWS || XBOX - static class Program + public static class Program { /// <summary> /// The main entry point for the application. diff --git a/src/Blaze-Brigade/Blaze_Brigade/ShortBow.cs b/src/Blaze-Brigade/Blaze_Brigade/ShortBow.cs index a40d20f..35c88b4 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/ShortBow.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/ShortBow.cs @@ -8,7 +8,7 @@ * This class represents a ranged weapon. * It implements the Weapon interface. */ - class ShortBow : Weapon + public class ShortBow : Weapon { private weaponType weapType; diff --git a/src/Blaze-Brigade/Blaze_Brigade/Sounds.cs b/src/Blaze-Brigade/Blaze_Brigade/Sounds.cs index 971cfb1..c3479a0 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Sounds.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Sounds.cs @@ -6,7 +6,7 @@ namespace View /// <summary> /// Sound class containing methods to play all different sounds to be used in the game /// </summary> - static class Sounds + public static class Sounds { /** This method takes in a unit, and plays an attacking sound corresponding to the unit's weapon. The weapon sounds include Sword, Bow, and Magic diff --git a/src/Blaze-Brigade/Blaze_Brigade/Unit.cs b/src/Blaze-Brigade/Blaze_Brigade/Unit.cs index 2bccae7..c58f203 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Unit.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Unit.cs @@ -17,7 +17,7 @@ namespace Model * This is the interface for the 3 playable unit classes, where the only differences in the units will be their statistics and graphical assets */ - interface Unit + public interface Unit { #region Stats /** @@ -204,6 +204,6 @@ namespace Model /** defines the possible classes of a unit */ - enum UnitType { Warrior, Archer, Mage }; - enum Direction { Down, Left, Right, Up }; + public enum UnitType { Warrior, Archer, Mage }; + public enum Direction { Down, Left, Right, Up }; } diff --git a/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs b/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs index 538edfe..51395c9 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Warrior.cs @@ -10,7 +10,7 @@ namespace Model /// The Warrior model class, extends Unit /// This unit excels in dealing melee physical damage, with a high defense, but suffers from lack of any magical attack or resistance /// </summary> - class Warrior : Unit + public class Warrior : Unit { /** Sets and returns whether or not unit is alive diff --git a/src/Blaze-Brigade/Blaze_Brigade/Weapon.cs b/src/Blaze-Brigade/Blaze_Brigade/Weapon.cs index 654aa31..49cb63e 100644 --- a/src/Blaze-Brigade/Blaze_Brigade/Weapon.cs +++ b/src/Blaze-Brigade/Blaze_Brigade/Weapon.cs @@ -10,7 +10,7 @@ namespace Model * This is the interface to be used when creating new weapons. * The only differences in weapons will be their statistics. */ - interface Weapon + public interface Weapon { /** Returns the name of the weapon. @@ -44,5 +44,5 @@ namespace Model } //Enum for different weapon types - enum weaponType { Sword, Bow, Magic }; + public enum weaponType { Sword, Bow, Magic }; } diff --git a/src/BlazeBrigadeTest/GameFunctionTest.cs b/src/BlazeBrigadeTest/GameFunctionTest.cs index 87cab9d..4a65afe 100644 --- a/src/BlazeBrigadeTest/GameFunctionTest.cs +++ b/src/BlazeBrigadeTest/GameFunctionTest.cs @@ -1,6 +1,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -using Blaze_Brigade; +using Controller; +using Model; +using Microsoft.Xna.Framework; namespace ControllerTest { @@ -10,10 +12,8 @@ namespace ControllerTest [TestMethod] public void isEnemyUnitInRange_WhenEnemyInRange_ShouldReturnTrue() { - //Unit unit = getNewUnit(UnitType.Warrior, new Vector2(17 * 32f, 15 * 32f), player1); - //Unit enemyUnit = getNewUnit(UnitType.Warrior, new Vector2(18 * 32f, 15 * 32f), player2); - - + Unit unit = Controller.Game.Instance.getNewUnit(UnitType.Warrior, new Vector2(17 * 32f, 15 * 32f), new Player()); + Unit enemyUnit = Controller.Game.Instance.getNewUnit(UnitType.Warrior, new Vector2(18 * 32f, 15 * 32f), new Player()); } } } diff --git a/src/BlazeBrigadeTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/BlazeBrigadeTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2a331662311cf52ae5cd41cb65ad266d5d03ca..91e9b2e7010c4a1762f407bed8e391728b733ac5 100644 GIT binary patch delta 614 zcmZoQYB$-igj=D^*(xTqIJKxaCb+aXF)zj?Ke;qFHLs*N#yzvdqcmyq2~m~Fuei@^ zvNJF+ut@@mTtYgY@B}k;F-{ib6PNMLOfJeV&QB{*2+J%kP0UdUE-6jP%vUfp(KDFr z%NxU(15y@^P!{3m7z4x#?uognP{lE2K*cdZscET2sd>q%#WCTTc`5nj#W58YW-)M` zdJ%bvdTvEPZRPnz*?K8CIczdO#}<OjPk^gZpqBX{_kk^u1zM5_v?O%$e_mcjxyihI znXK|av3Q_Z%;xKSzgWZ-fLs_5WCOAoftXEkGNV|eoFFJz!F(kkgT<{hCx?*($YKRz zPKC+wBBD+TKqd?bazR;w+&~66N>qRhiE8J>yp+t8#FA9U;^NfYq?}5(%$(HXS~gXn zY#1mECZ82?U{ssTCo0aa4iuBB4w>x0B*s!%%ce0ooZHh}6DY`A9h6uO(&z{DT`ijy kP{@~1WS<bVVAKYBC5lxCs5}-N5?jTD7!@|35VK_h0I8#^yZ`_I delta 386 zcmZoSX*Jrggj=b?*(xTqIJKxaCL|*>HBTX=C^0W3GcO~?B|o_|H#M)Mc=7`tiOF}k zZ)>wMFfg!50*QQL^aP9LxLC!6Wfqqv<|qW0l%{0nD;OCVnoiE(jbTij{6Qp?FSj^3 zzbGd&NiQWQhfQX(Ab%#SEYSFPkmTko{EV#PazHK&2(kfLj6lpLKlzPFvX%mn$>LU; zlf%dXWPu#ViL9KF6D~TrQdEvnY4QwFSypABU>MMR@yQoO9VAtNJfUij%)F9-#F7lR zqWoOXlGNN<Hr2^mV)Be?lfA?|E!BZ)c&mdF%iS__QvDKhQ)}5YfI|MngaIhrcqYFS Z6JgW@IysVwO>1(Tcs8Tl=2POfOaRPeYS#b& -- GitLab