-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement tutorial mode with guided gameplay and bonus explanations #39
Conversation
@Gift-Naomi is attempting to deploy a commit to the z-korp Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes introduce a new "Tutorial" mode to the game, enhancing the existing gameplay options. This includes modifications to the Changes
Assessment against linked issues
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
client/src/dojo/game/types/mode.ts (1)
Line range hint
20-20
: Handle the newTutorial
mode induration
andprice
methods.The
duration
andprice
methods in theMode
class do not handle the newTutorial
mode. This could lead to unexpected behavior when this mode is used.Consider adding cases for
Tutorial
in these methods. For example:public duration(): number { switch (this.value) { case ModeType.Normal: return 60480000; case ModeType.Daily: return 86400; case ModeType.None: return 0; + case ModeType.Tutorial: + return 3600; // Example duration for tutorial mode } } public price(): bigint { switch (this.value) { case ModeType.Normal: return BigInt(0); case ModeType.Daily: return BigInt(0); case ModeType.None: return BigInt(0); + case ModeType.Tutorial: + return BigInt(0); // Assuming no cost for tutorial mode } }Also applies to: 30-30
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- client/src/dojo/game/types/mode.ts (1 hunks)
- client/src/ui/actions/Start.tsx (2 hunks)
- client/src/ui/screens/Home.tsx (5 hunks)
Files skipped from review due to trivial changes (1)
- client/src/ui/screens/Home.tsx
Additional comments not posted (2)
client/src/ui/actions/Start.tsx (2)
90-101
: Approve the enhanced mode title determination logic.The switch-case structure for determining the mode title is a clear improvement over the previous ternary operator. It enhances readability and maintainability, especially with the addition of the new
Tutorial Mode
.
65-65
: Approve the syntax improvement.The addition of a semicolon at the end of the
handleGameMode
function call is a minor but positive change for maintaining consistency in code style.
@@ -2,6 +2,7 @@ export enum ModeType { | |||
None = "None", | |||
Normal = "Normal", | |||
Daily = "Daily", | |||
Tutorial = "Totorial", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the spelling mistake in the enum value.
The enum value for Tutorial
is misspelled as "Totorial". This should be corrected to maintain consistency and avoid potential bugs.
Apply this diff to correct the spelling:
- Tutorial = "Totorial",
+ Tutorial = "Tutorial",
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Tutorial = "Totorial", | |
Tutorial = "Tutorial", |
Resolves #22
Summary by CodeRabbit
New Features
Improvements