Skip to content
Snippets Groups Projects
Commit 48080959 authored by Jeremy Klotz's avatar Jeremy Klotz
Browse files

Added an array of integers to hold the current player turn. Notfully...

Added an array of integers to hold the current player turn. Notfully implemented yet, just added in preperation for sprint # 2.
parent d17b1a78
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,8 @@ namespace Controller
Graph graph;
Player player1;
Player player2;
int[] allPlayers; // If at [0] , p1 turn, etc. Iterates through array in incremental fashion.
// If at end, go back to index 0
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
......@@ -94,6 +96,12 @@ namespace Controller
graph = new Graph(50,32);
player1 = new Player();
player2 = new Player();
allPlayers = new int[2];
// current turn based on index of array, perhaps a randomizing func to determine who goes first.
// when turn over, move to next index of array. When at end of array, go to start
allPlayers[0] = 1; // p1 turn
allPlayers[1] = 2; // p2 turn
// load character sprite and set position
Vector2 unit1Position = new Vector2(32.0f, 32.0f);
......
......@@ -15,6 +15,7 @@ namespace Controller
private bool playableUnitSelected;
private Unit selectedUnit;
private Player currentPlayer;
// might not need; check if enemyUnitsInRange returns an empty list
public bool isAnEnemyUnitInRange(Unit unit)
......@@ -260,5 +261,16 @@ namespace Controller
return path;
}
public void firstTurn()
{
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment