Skip to content
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

Add New Game button to menu #294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ginibrandon
Copy link

Description

Adds the ability to abandon a game early by clicking the "New Game" button in the menu at any point during the game.
This fast forwards you to the "game over" menu but retains the history of the abandoned game.

Notes

  • I was a little constrained by translations here, I'm not sure what the philosophy is on adding new untranslated text. "New Game" is not the most accurate wording but there's no existing translation for "Abandon Game". There also aren't any translations for words I could use in a confirmation dialog so I wasn't able to add that either
  • Whether or not one person should be able to end the game just like that without discussion is questionable, but since it is a fully co-op game, ending it doesn't erase any history, and they could achieve the same result by just closing the browser, I figured it was reasonable

Screenshots

image
image
image

Copy link

vercel bot commented Apr 20, 2024

@ginibrandon is attempting to deploy a commit to the Pelica Team on Vercel.

A member of the Team first needs to authorize it.

@dcorbin
Copy link
Collaborator

dcorbin commented Apr 20, 2024

I believe the policy is to create new English terminology as needed, and then people can submit PRs for translation of new terms. Certainly, that's my preference (but I'm an English-speaker).

Copy link
Collaborator

@dcorbin dcorbin left a comment

Choose a reason for hiding this comment

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

I haven't tested it, but it seems that you're going to offer "New Game" in the menu even when the game is already completed. Which will then mark the game as abandoned when it wasn't. I think that menu Option should only be shown when a game is in-progress. Likewise, calling restartGame({abandoned:true}) should check to make sure the game is in progress before marking it abandoned.

I also prefer "Abandon Game" to "New Game".

I also wonder if we should have an "Are you sure" confirmation before doing that work, because it is "destructive". Maybe make the menu button be "red-ish" to emphasize the danger of the selection.

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.

2 participants