-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix #197 c center immutable offset wrapper resolve all issues #211
base: master
Are you sure you want to change the base?
Fix #197 c center immutable offset wrapper resolve all issues #211
Conversation
… every use, when game start then update the offset of each one in the collection and change to a center running strategy. Not modeled as a full state to not add a setter in game for center attribute.
…normal position when game runs.
Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
Me comí una "s" Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
me comí una "s" Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
espacios Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
Cálculo de promedio para una colección
Tests for cyclic const instance references
…es (#218) * Fix issue 274 in wollok-ts * Achieved throwing error for void parameters in all cases * Removing checkValidClosure * Removing === void * Fix assignments to void * add validation for void singleton * Enhancing validation test * Using void expressions instead of void wko & add validations
…Keyword Fix shouldUseOverrideKeyword para properties
* redefine identity adding tests + validations messages * Review requests --------- Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
* fix-flatmap * Add tests for flatMap using sets * Add documentation * Enhance wollok doc --------- Co-authored-by: Guillermocastro22 <castrojunior068@gmail.com> Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
* documentacion dias string * Update src/wollok/lang.wlk --------- Co-authored-by: matnahuel <matias.nahuel.carabajal.mc@gmail.com> Co-authored-by: Fernando Dodino <fernando.dodino@gmail.com>
buenísimo @isaiaslafon , avisanos cuando esté para revisar |
* Add validation test * Add extra test
* Fix flatten * Enhance wollok doc for flatten
As a first aproximation to the issue is not bad, but beacause is only affecting Wollok-TS and not Xtext version maybe is better to translate the code to TS domain, I even believe in TS maybe we can "hack" origin/center references and set a final value after start. But I don't know much about TypeScript yet. |
* Add sanity & validation tests * Add tests for uppercase validations * Add string with unicode chars * Update test/sanity/basics/unicode.wtest Co-authored-by: Nahuel Palumbo <nahuel.palumbo@gmail.com> * Add extra tests --------- Co-authored-by: Nahuel Palumbo <nahuel.palumbo@gmail.com>
…wollok_ts_cli_issue_201 wrap actions using io.runHandler (fix #229 )
Hola @isaiaslafon ! Disculpá que colgué en revisar esto. Muy groso todo! Yo acá implementaría las cosas como queremos: make it work - make it right - make it fast. No me preocuparía por la 3) hasta no tener la 2). De este PR solo me quedaría con la clase Por ejemplo: class CenteredPosition inherits AbstractPosition {
const offsetX
const offsetY
override method x() = game.width().div(2) + offsetX
....
// Acá se podría fijar si el juego ya empezó y cambiar a trabajar con posiciones normales, esto debería ser transparente para el usuario y no tiene mucho costo.
override method createPosition(_x, _y) = if (game.started()) new Position(...) else new CenterPosition(...)
} Con esto ya se soluciona el issue de que los objetos no aparecen donde se espera. Y los temas de que Game es lento lo podemos ir atacando transversalmente. |
Me convence 100% lo que decis! En principio lo había resuelto así para generar en el game start un poco más de trabajo pero luego que ya quede simplificado. Pero me gusta mucho la propuesta que haces. Tengo que ver bien como bajo y genero los tests de todo y de esta solución, tuve problemas cuando quise hacer todo por ssh y no los pude solucionar en su momento. Tengo que retomar y configurar de 0. Gracias! |
…ed xCenter yCenter game methods.
Cualquier cosa si pueden echarle una mirada, ¿prefieren que se repita código de xCenter yCenter tanto en game como Center? |
@isaiaslafon así está re piola! Habría que agregarle tests, fijate en los sanity: https://github.com/uqbar-project/wollok-language/tree/master/test/sanity/game |
Estoy haciendo los test, surgió una duda con eso, en la versión de TS permite configurar el tablero conl alto y ancho con números con decimales (ya agregué un issue en TS), pero no se si tener esto en cuenta para el "round" de CenterOffset ya que simplificaría saber que nunca el alto y ancho van a ser números que se necesiten redondear.
|
…es' of https://github.com/uqbar-project/wollok-language into #197-c-center-inmutable-offset-wrapper-resolve-all-issues
Wollok Language modification to fix default center and transformations issues before game start of game.center().
Is a new especial center position that post calculates and add an offset until the game starts. After start every center object return normal positions in the required methods (up, down, round, etc..). Updated and simplified.