You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code looks good and easy to read, the structure is clear, the game runs without unhandled errors, but there are a bunch of improvements could be made:
The description repetition:
Game outputs the room description every iteration which discards the need in 'look' command that does the same and creates repetition of text.
Inventory items:
The PickUpItem() in the Room Class returns a strings with the "You picked up a ..." at the beginning, which looks weird inside the inventory, could just leave the name of the item.
XML Documentation:
If you want to be considered for a higher grade, you'll need to include XML Documentation inside your code
Testing Class:
Your code lacks the testing class with Debug.Assert methods
But despite that, your code is great, and you clearly understand OOP principles
Notes on action menu interaction
• I particularly like the use of Console.Clear() to maintain minimal text display for the user and reduce sensory overload. However, this does cause an issue with cases “1” and “default” of the switch-case statement block. For example, in case 1,when the player picks up an item, the code is suppose to display “You picked up a {item}.” to the user. However, because the while loop immediately starts again the next statement executed is Console.Clear(), meaning all console output related to item pickup and invalid user input (managed by the default case) is cleared straight away and cannot be seen by the user. Adding Console.ReadKey() to the bottom of every case statement would solve this issue.
• The blocks of the case statements handling the action menu choice could be simplified with additional methods. For example, the case “3” handling player status could be moved to a separate method PlayerStatus() called by case “3”.
—
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.