Skip to content

Added comments to code files and improved game logic#129

Open
Berritua wants to merge 1 commit into
cfrantzidis:masterfrom
Berritua:master
Open

Added comments to code files and improved game logic#129
Berritua wants to merge 1 commit into
cfrantzidis:masterfrom
Berritua:master

Conversation

@Berritua

Copy link
Copy Markdown

No description provided.

@Berritua Berritua marked this pull request as draft March 14, 2025 18:54
@Berritua Berritua marked this pull request as ready for review March 14, 2025 18:54
@svyatfurst

Copy link
Copy Markdown

Great effort overall!!!

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

@jesse1234-cyber

Copy link
Copy Markdown

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”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants