C
C#2y ago
hills

❔ Fixing some methods

Working on a game for my course right now. There are two methods that i need to fix: PlayGame and DisplayState. As it stands the game allows each player to accept an unlimited number of offer moves and swap them into their move queue. The offer move is displayed at the start of the turn. If the offer move is accepted and swapped into the queue: - I need to make sure another offer move is NOT displayed. - The prompt "…or 9 to take the offer: " should be hidden, so that only "Choose move option to use from queue (1 to 3)" is displayed - When the player's turn is complete, an offer move and all prompts should be displayed for the other player. Any help would be massively appreciated
8 Replies
hills
hillsOP2y ago
hills
hillsOP2y ago
Anton
Anton2y ago
$code
MODiX
MODiX2y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
hills
hillsOP2y ago
PlayGame Method https://paste.mod.gg/wtlncwgjnhmy/0 DisplayState Method
private void DisplayState()
{
DisplayBoard();
Console.WriteLine("Move option offer: " + MoveOptionOffer[MoveOptionOfferPosition]);
Console.WriteLine();
Console.WriteLine(CurrentPlayer.GetPlayerStateAsString());
Console.WriteLine("Turn: " + CurrentPlayer.GetName());
Console.WriteLine();
}
private void DisplayState()
{
DisplayBoard();
Console.WriteLine("Move option offer: " + MoveOptionOffer[MoveOptionOfferPosition]);
Console.WriteLine();
Console.WriteLine(CurrentPlayer.GetPlayerStateAsString());
Console.WriteLine("Turn: " + CurrentPlayer.GetName());
Console.WriteLine();
}
BlazeBin - wtlncwgjnhmy
A tool for sharing your source code with the world!
Anu6is
Anu6is2y ago
what's your actual question though?
hills
hillsOP2y ago
the bullet points i need to alter the code so it meets those conditions im not even exactly sure how to go about tht
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server