Hey guys, I'm new to all this but basically I've been given the task to create a simple C# board game using the console screen.
The game consists of a 36 square board and 2 players (player 1 & player 2). Both the players take it in turns to roll a single die and the number displayed indicates how many space along the board they can move. Once a player passes the original starting point they are rewarded 1 point, the first player to receive 5 points wins. The console screen should display (for both player each time a die is rolled):
player1
rolled: (number rolled)
board position (new board position)
number of points: (number of laps currently achieved)
I've come up with how I think the program should work but I have come to a bit of a dead end in terms of coding it, any help would be great appreciated.
set player1globalposition = 0
set player2globalposition = 0
set turn = 0
i want to loop until player1globalposition >= 36*5 or player2globalposition >= 36*5
i want to increment the turn every time so turn = turn + 1
if turn mod 2 = 0 then
//must be player1's turn
display player1 + "Rolled: " + display roll
"New board position: " + display player1globalposition mod 36
"Completed board laps: " + display (player1globalposition/36).floor
player1globalposition = player1globlposition + roll
else
//must be player2's turn
display player2 + "Rolled: " + display roll
"New board position: " + display player2globalposition mod 36
"Completed board laps: " + display (player2globalposition/36).floor
player2globalposition = player2globlposition + roll
^then go back and loop for the next turn
disply winner