Skip to content

Awaiting Peer Review#132

Open
MichaelBamb wants to merge 3 commits into
cfrantzidis:masterfrom
MichaelBamb:master
Open

Awaiting Peer Review#132
MichaelBamb wants to merge 3 commits into
cfrantzidis:masterfrom
MichaelBamb:master

Conversation

@MichaelBamb

Copy link
Copy Markdown

I am aware that this is late however I have applied for mitigating circumstances for personal reasons.

@MichaelBamb MichaelBamb marked this pull request as ready for review March 19, 2025 07:00

@KyleD47 KyleD47 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a glaring lack of comments. There is no exit function present to close the program despite the option to exit being present during runtime.

@moonlitlyra moonlitlyra left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass Standard

Requirement Review
The code compiles and runs Code compiles and runs without error in Visual Studio 2022
The player can explore at least one room Yes. Navigation is by a user-action menu that currently has a maximum of 3 choices: player stats; get item; exit.
Object instantiation, method calls evident Every room is an instance of the Room class containing methods such as GetDescription(). I particularly like the use of the AddItem() method to add new items to a room after instantiation.
There is code review from two students N/A
Handle invalid commands gracefully without crashing the program The program runs smoothly without exception. Further input validation could be included in the user action-menu to display an error message if the user chooses an option not present e.g. “Your selection is not valid. Please try again.”

2:2 Standard

Requirement Review
Rooms can contain multiple items or monsters The room class stores collections for the number of items in the room.
The Testing class is used No testing class is implemented, but user input is handled gracefully without exceptions.
The player can pick up items through an implementation of the Player.PickUpItem() method Yes
The C# style guide is followed partially 1. Variable names follow camelCase convention and are both intuitive and simple, with PascalCase used for all primary constructors. 2. String interpolation via the $ special character instead of concatenation or composite formatting would improve code readability. 3. Concise object instantiation could also be used. (e.g public List(string) newItems = new() instead of public List(string) newItems = new List(string) (); ) However, this feature is only available in the newest versions of C#. Single line comments are descriptive. 4. Comments could be used to explain the purpose of flow-control logic in the user action menu. e.g. // Checks if the room contains an item, otherwise an error messaged should be displayed.
At least one room has a description and can contain one item or one monster. These functionalities are given by Room.GetDescription() method All rooms contain a description which is passed at instantiate. Rooms have the option to store multiple items through a List collection – at present only 1 item is stored in the room.
Method calls from “Main” to methods in other classes Yes

2:1 Standard

Requirement Review
Pull Requests and code reviews are noted N/A
You have taken account of reviews and merging your changes N/A
There is a complete implementation of your code with no issues Code compiles and runs without error in Visual Studio 2022 and no exceptions have been raised through testing.
Commenting is mostly through the code files At present the code is not commented but the logic is easy to understand, so comments wouldn’t be needed extensively.
There are at least one Game and Player objects Yes
There is evidence of testing The Player SetHealth() method is not called anywhere in the code. This suggests the method may have been used during preliminary development of an enemy system that was eventually not included.
Error handling is performed well but there are still issues No issues.
There is clear evidence of object-oriented features such as classes, object instantiation, encapsulation and methods Player and Room are both instances of a class with private and public fields, as well as methods to control behaviour. For instance, in the Room class the items list is a private field with access controlled using public AddItem() and RemoveItem() methods. In future developments logic could be easily added to these functions validating item management in each Room. For example, each room could have a cap on the number of items allowed – checked with a flow control statement in the AddItem() method.

First Standard

Requirement Review
You have taken effective account of the reviews by merging your changes or suggesting alternative approaches N/A
The video demonstrates a critical reflection and that you learned from the assignment’s experience N/A
The implementation is complete with excellent error handling No errors identified and some user-input validation is performed.
The C# style guide is shown to be adhered to. XML documenting comments are throughout the code XML comments are not used to summarise class, method or property types. Code would benefit from XML comments for all of the above. An example of an XML comment for the Player health property might be: /// value /// Property cHealth/c represents the current health of the player is capped at 100. Accessed through public methods for validation. /// /value
The testing class uses ‘debug.assert’ to verify aspects of the code The use of a testing class is not present but could easily be implemented.
The implementation of classes, object instantiation, encapsulation and methods are complete and with no issues All object-oriented features are implemented flawlessly.

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