-
-
Notifications
You must be signed in to change notification settings - Fork 67
Outcomerequirements #3329
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
base: develop
Are you sure you want to change the base?
Outcomerequirements #3329
Conversation
b6d4dc8 to
83a1326
Compare
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.
Sur l'évent 1
chopTree 3 : vous finissez par abandonner et vous reposez -> vous finissez par abandonner et vous reposer OU vous finissez par abandonner et vous vous reposez (je suis plus partiel au deuxième perso)
findPath 1 : répétition sémantique avec le "racines de l'arbre déraciné", je propose un qualificatif différent, pour un truc style "racines de l'arbre effondré", d'autant plus que "déraciné" a déjà été utilisé dans le texte d'intro de l'évent
texte d'intro de l'évent : sur le sentier sinueux -> sur un sentier sinueux
et aussi :
L'arbre ancestral, dont le tronc fait bien deux mètres de diamètre et barre complètement le passage.
Pourquoi cette phrase n'a aucun verbe dans sa première proposition ? Si on enlève le "dont le tronc fait bien [bla bla]", la phrase c'est "L'arbre ancestral", et ça n'a aucun sens. Peut-être l'intention ici est-elle plutôt de dire que c'est l'arbre ancestral qui barre la passage, auquel cas il faudrait remplacer le "et" par une virgule pour que ce qui barre soit effectivement l'arbre ancestral et non pas "le tronc".
| } | ||
|
|
||
| function getAllLevelBoundaries(outcomes: Record<string, Outcome>): number[] { | ||
| const boundaries = new Set<number>([0, 1]); // Always include level 0 and 1 |
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.
Explique pourquoi ces valeurs là pour les tests, car je vois vraiment pas à quoi ca correspond exactement (same comment pour les autres Set en dessous)
| } | ||
|
|
||
| function getAllClasses(outcomes: Record<string, Outcome>): number[] { | ||
| const classes = new Set<number>([1, 2, 3, 4, 5]); // Assume common class IDs |
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.
test bugprone : Si une classe n'est pas incluse ici, elle pourrait être ignorée par les tests
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.
je croyais qu'on lisais pas les constantes dans les tests
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.
ok mon commentaire est stupide, je fixerai
| export interface PossibilityOutcome { | ||
|
|
||
| requirements?: { | ||
| level: { |
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.
typo "?" ?
|
|
||
| export interface PossibilityOutcome { | ||
|
|
||
| requirements?: { |
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.
requirements est pas présent dans tous les events ?
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.
il va falloire que je le rajoute, cette pr est pas finie mdr
| function isRangeValid( | ||
| range: { min?: number; max?: number } | undefined, | ||
| value: number | ||
| ): boolean { | ||
| if (!range) return true; | ||
| if (range.min !== undefined && value < range.min) return false; | ||
| if (range.max !== undefined && value > range.max) return false; | ||
| return true; | ||
| } | ||
|
|
||
| function isOutcomeValidForStats( | ||
| requirements: OutcomeRequirements | undefined, | ||
| stats: { | ||
| level: number; | ||
| health: number; | ||
| defense: number; | ||
| attack: number; | ||
| speed: number; | ||
| class: number; | ||
| } | ||
| ): boolean { | ||
| if (!requirements) return true; | ||
|
|
||
| return ( | ||
| isRangeValid(requirements.level, stats.level) && | ||
| isRangeValid(requirements.health, stats.health) && | ||
| isRangeValid(requirements.defense, stats.defense) && | ||
| isRangeValid(requirements.attack, stats.attack) && | ||
| isRangeValid(requirements.speed, stats.speed) && | ||
| (requirements.validClassIds === undefined || requirements.validClassIds.includes(stats.class)) | ||
| ); | ||
| } |
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.
ces deux fonctions sont des copy paste de la vraie fonction, faut faire des valeurs en dur pour les tests
b86790c to
82cdda4
Compare
b0aa659 to
73c1181
Compare
73c1181 to
f4503f4
Compare
113aacc to
93206b1
Compare
Co-authored-by: Ravenclaw <[email protected]>
Co-authored-by: Gabriel <[email protected]> Co-authored-by: Ravenclaw <[email protected]>
Co-authored-by: Gabriel <[email protected]> Co-authored-by: Ravenclaw <[email protected]>
03c1732 to
61436d3
Compare
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.
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
Enforce advisory code health rules
(2 files with Complex Method, Large Method)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| Player.ts | 1 rule in this hotspot | 6.34 → 6.33 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| PossibilityOutcome.ts | 1 advisory rule | 8.55 → 8.50 | Suppress |
| Player.ts | 1 advisory rule | 6.34 → 6.33 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
|
pourquoi je sens que cette pr va être un enfer à merge ? |
Nan tkt. CA ira |
No description provided.