-
Notifications
You must be signed in to change notification settings - Fork 16
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
Solo mini-game #895
Solo mini-game #895
Conversation
Co-authored-by: saachibm <saachibm@users.noreply.github.com> Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com> Co-authored-by: sgfost <sgfost@users.noreply.github.com>
Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com>
Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com>
Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com>
…k card entities refactor: minor changes to solo game treatment Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com>
TODO: - implement service layer for persistence, recovery(?), and retrieval ref #856
- minor renaming - add types - fix issues/refactor in the game logic commands
state is currently local to the component, we should reorganize the single vuex store we have currently (split up game and anything else) and then add a new SoloGame store
add solo game db model
- add fixtures for game treatments and event cards - add service methods for persisting game data and drawing cards/picking treatments - reworked solo game entities - (re-)add migration for solo game data model ref #856
add link to nav bar, which should probably have a better name
Co-authored-by: sgfost <sgfost@users.noreply.github.com>
finalization (updatePlayerPoints) would throw an error since gameId was not set on the solo_player
Co-authored-by: sgfost <sgfost@users.noreply.github.com>
Co-authored-by: sabrinanel3 <sabrinanel3@users.noreply.github.com> Co-authored-by: Tiffany Kawamura <Tkawamura02@users.noreply.github.com>
by setting activeRoundCardIndex to -1
Additional fixes to the solo game dashboard layout
add solo minigame highscores
OCD rename of Highscores to HighScore to maintain codebase consistency; entities are all singular, e.g., User | TournamentRound | Player etc., which made SoloHighscores stick out https://en.wiktionary.org/wiki/the_nail_that_sticks_out_gets_hammered_down
prevent "at or below around" threshold info message
fix Splash.vue copypasta GameOver class name standardize text in Splash screen to use solo game instead of simulation / trial / etc add `make docker-clean` target to rebuild from scratch
motherlode is the more common nomenclature for hitting the jackpot. maybe? https://english.stackexchange.com/questions/390418/motherload-a-common-mistake-or-slang-word
`drawRoundCards` method when called for the second time to deal with a murphy's law card was re-drawing the previous cards, needed to draw from the pool of non-round non-expired cards instead of just non-expired resolves #899
otherwise, you could just keep starting new games and abandoning them to make your way through the treatments
remove accidental pasta from MarsEvents
remove dead code and minor hygiene elsewhere, get rid of "simulation" language in favor of standard game over like the actual multiplayer game should consider if scroll wheel is worth using as an input device to change investment vs keyboard right/left arrows or +/- j/k wsad etc
@@ -147,6 +139,8 @@ export default class SegmentedBar extends Vue { | |||
} | |||
|
|||
mounted() { | |||
// FIXME: consider if we really want to use scroll wheel to increment / decrement the value, keyboard input might be | |||
// better for accessibility (+ / -) (<- ->)? |
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.
keyboard controls are a good idea, L/R arrow keys and enter for investing/continuing through events
the scroll thing only happens when the cursor is over the input bar so it hopefully wouldn't interfere with anything too much, though probably unnecessary if we have keyboard controls
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.
great work @virtualcommons/port-of-mars-dev team! This looks really solid. I had a few issues with overall codebase consistency but these are mostly simple changes like making imports consistent etc.
Changes to the schema are a thornier issue but we can discuss at this afternoon's meeting
|
||
@OneToOne(type => SoloPlayer, player => player.game) | ||
@JoinColumn() | ||
player!: SoloPlayer; |
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.
this comment is a bit late, but is there really a need for a SoloPlayer
entity at all? Why not have SoloGame
point directly at a User
?
const roll = getRandomIntInclusive(card.rollMin, card.rollMax); | ||
// fill out templates from the db with the actual roll value and pluralization | ||
const effectText = card.effect | ||
.replace("{roll}", roll.toString()) |
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.
these dynamic template strings could also be set up as functions in the EventCards themselves, something like https://stackoverflow.com/a/40147828/93370
(for the future)
- left/right arrow keys for incr/decr investment - enter to submit investment - space to skip events (not using enter to prevent spamming through events and then submitting 0 immediately)
[no ci]
@all-contributors please add @sabrinanel3 for code, docs, design @alee just remembered @sabrinanel3 is missing from the @.virtualcommons/port-of-mars-dev team as well and I can't seem to add people to that |
This project's configuration file has malformed JSON: .all-contributorsrc. Error:: Unexpected token ] in JSON at position 3367 |
@all-contributors please add @sabrinanel3 for code, docs, design |
I've put up a pull request to add @sabrinanel3! 🎉 |
Main development branch which adds the implementation of a solo game mode as described in #856