diff --git a/Roguelike/Assembly-CSharp-Editor.csproj b/Roguelike/Assembly-CSharp-Editor.csproj
index da8e4c65..0275dde4 100644
--- a/Roguelike/Assembly-CSharp-Editor.csproj
+++ b/Roguelike/Assembly-CSharp-Editor.csproj
@@ -48,6 +48,9 @@
+
+ C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll
+
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll
@@ -63,6 +66,9 @@
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll
+
+ C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll
+
C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll
diff --git a/Roguelike/Assembly-CSharp.csproj b/Roguelike/Assembly-CSharp.csproj
index 25f49a77..4722b3a7 100644
--- a/Roguelike/Assembly-CSharp.csproj
+++ b/Roguelike/Assembly-CSharp.csproj
@@ -59,12 +59,18 @@
+
+ C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/UnityEngine.Advertisements.dll
+
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll
+
+ C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityAnalytics/UnityEngine.Analytics.dll
+
C:/Program Files/Unity/Editor/Data/Managed/Mono.Cecil.dll
diff --git a/Roguelike/Assets/Scripts/ProdGen/BoardManager.cs b/Roguelike/Assets/Scripts/ProdGen/BoardManager.cs
index 026aa645..bfc12953 100644
--- a/Roguelike/Assets/Scripts/ProdGen/BoardManager.cs
+++ b/Roguelike/Assets/Scripts/ProdGen/BoardManager.cs
@@ -1,18 +1,20 @@
using UnityEngine;
using System;
-using System.Collections.Generic;
-using Random = UnityEngine.Random;
+using System.Collections.Generic; //Allows us to use lists
+using Random = UnityEngine.Random; // Tells Random to use Untiy Engine Random number generator
//++Add in Comments++
namespace Completed
{
public class BoardManager : MonoBehaviour {
+ //Using serializable allows us to embed a class wit hsub properties in sinpsector
[Serializable]
public class Count
{
- public int minimum;
- public int maximum;
+ public int minimum; //Minimum value for our count class
+ public int maximum; //Maximum value for our count class
+ //assignment constructor
public Count(int min, int max)
{
minimum = min;
@@ -20,56 +22,72 @@ public class BoardManager : MonoBehaviour {
}
}
- //--------------------------------------------------
- public int columns = 8;
- public int rows = 8;
- public Count wallCount = new Count(5, 9);
- public Count foodCount = new Count(1, 5);
- public GameObject exit;
- public GameObject[] floorTiles;
- public GameObject[] wallTiles;
- public GameObject[] foodTiles;
- public GameObject[] enemyTiles;
- public GameObject[] outerWallTiles;
-
- private Transform boardHolder;
- private List gridPositions = new List();
-
-
+ //Declarations--------------------------------------------------
+ public int columns = 8; //Number of columns in our game baord
+ public int rows = 8; //Number of Rows in our game board
+ public Count wallCount = new Count(5, 9); //Lower and upper limit for our random number
+ public Count foodCount = new Count(1, 5); //Lowra nd uper limit for our random food count
+ public GameObject exit; //Prefab to spawn for exit
+ //Arrays
+ public GameObject[] floorTiles; //Array of floor prefabs
+ public GameObject[] wallTiles; //Array of wall prefabs
+ public GameObject[] foodTiles; //Array of food prefabs
+ public GameObject[] enemyTiles; //Array of enemy prefabs
+ public GameObject[] outerWallTiles; //Array of ourter tile prefabs
+
+ private Transform boardHolder; //A variable to store references to the transform of something
+ private List gridPositions = new List(); //A list of possible locations to place tiles
+
+ //Clears our list gridPositions and prepares it to generate a new board.
void InitialiseList()
{
+ //clear our list gridPositions
gridPositions.Clear();
- for(int x=1; x< columns - 1; x++)
+ //Loot through x axis (columns)
+ for (int x=1; x< columns - 1; x++)
{
- //Do this thing while x>columns - 1
+ //within each column, loop through the y axis (rows)
+
for (int y = 1; y < rows -1; y++)
{
+ //At each index add a new vector3 to our lists with the x and y coordinates of that position
gridPositions.Add(new Vector3(x, y, 0f));
}
}
}
+
+ //Sets up the outer walls and flolors of the game
void BoardSetup()
{
+ //instanciates baords and sets iup boardholder to its transform
boardHolder = new GameObject("Board").transform;
+ //loop along the x axis, starting from - 1 (to fill corner) with floor and outerwall edge tiles
for(int x = -1; x