Skip to content

Commit

Permalink
Incomplete tactical dice implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
redleek committed Dec 5, 2014
1 parent 68fc712 commit 6063011
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
27 changes: 21 additions & 6 deletions TacticalSpaceCheeseRacer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ struct Player
// Initialise the 'won' game state to false so the main loop is enabled.
static bool gamewon = false;

// Locations of all the cheese squares.
static int[] cheese_squares = new int[8] { 8, 15, 19, 28, 33, 45, 55, 59 };

// Represents the status of debug mode
# if DEBUG
static bool debugmode = false;
Expand Down Expand Up @@ -387,6 +390,11 @@ static void Power6(int playerno)
break;
} while (true);
}

static void TacticalRoll()
{
// Do stuff.
}
#endregion
#endregion

Expand Down Expand Up @@ -423,13 +431,20 @@ static void Main(string[] args)
Console.WriteLine("{0} has won the game!", players[playercount].name);
break;
}
else

// Check if the player is on a cheese square
for (int item = 0; item < cheese_squares.Length; item++)
{
// Do tactical stuff later.
Power6(playercount);
//PrintPosition(playercount);
if (item == players[playercount].position)
{
TacticalRoll();
players[playercount].tact_roll_used = true;
}
}

// Ask if the player wants to roll the tactics dice.
PrintPosition(playercount);

Console.Write("Press enter to continue...");
Console.ReadLine();
Console.WriteLine();
Expand All @@ -445,7 +460,7 @@ static void Main(string[] args)
}

} while (replay);

/* Testing functions
SetupGame(false, false);
players[0].name = "Freddie Mercury";
Expand All @@ -454,7 +469,7 @@ static void Main(string[] args)
Console.WriteLine("{0} has a position of {1}", players[0].name, players[0].position);
Power5(0);
*/

return;
}
}
Expand Down
12 changes: 0 additions & 12 deletions TacticalSpaceCheeseRacer/Test.cs

This file was deleted.

0 comments on commit 6063011

Please sign in to comment.