From ac81931ae92a90e21158130772a2c18ae6e20165 Mon Sep 17 00:00:00 2001 From: Fernando Dodino Date: Sat, 8 Dec 2018 01:55:22 -0300 Subject: [PATCH] Review fixes --- .../src/org/uqbar/project/wollok/game/VisualComponent.xtend | 4 ++-- .../uqbar/project/wollok/tests/game/ArrowListenerTest.xtend | 2 +- .../src/org/uqbar/project/wollok/messages.properties | 2 +- .../src/org/uqbar/project/wollok/messages_es.properties | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend index 994482d881..f92fa76c2e 100644 --- a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend +++ b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend @@ -99,7 +99,7 @@ abstract class VisualComponent { def showAttributes() { showAttributes = true } def void up() { - if (position.y < Gameboard.instance.height) + if (position.y < Gameboard.instance.height - 1) setPosition(getPosition.up()) } @@ -114,7 +114,7 @@ abstract class VisualComponent { } def void right() { - if (position.x < Gameboard.instance.width) + if (position.x < Gameboard.instance.width - 1) setPosition(getPosition.right()) } } diff --git a/org.uqbar.project.wollok.tests/src/org/uqbar/project/wollok/tests/game/ArrowListenerTest.xtend b/org.uqbar.project.wollok.tests/src/org/uqbar/project/wollok/tests/game/ArrowListenerTest.xtend index 5f13c49692..ac37619f96 100644 --- a/org.uqbar.project.wollok.tests/src/org/uqbar/project/wollok/tests/game/ArrowListenerTest.xtend +++ b/org.uqbar.project.wollok.tests/src/org/uqbar/project/wollok/tests/game/ArrowListenerTest.xtend @@ -80,7 +80,7 @@ class ArrowListenerTest { this.press("RIGHT") arrowListener.notify(gameboard) - Assert.assertEquals(new WGPosition(5, 4), character.position) + Assert.assertEquals(new WGPosition(4, 4), character.position) } def press(String key) { diff --git a/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages.properties b/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages.properties index 683757844c..a1cd049dba 100644 --- a/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages.properties +++ b/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages.properties @@ -26,7 +26,7 @@ WollokInterpreter_operationNotSupported = Operation "{0}" not supported by inter WollokInterpreter_operatorNotSupported = Operator "{0}" not supported for {1} WollokInterpreter_constructorCallNotAllowed = Impossible to call a constructor on anything besides a class WollokInterpreter_binaryOperationNotCompoundAssignment = Binary operation is not a compound assignment -WollokInterpreter_visualObjectWithoutPosition = Visual object doesn't have any position: {0} +WollokInterpreter_visualObjectWithoutPosition = Visual object doesn't have any position attribute: {0} WollokInterpreter_illegalOperationEmptyCollection = Illegal operation ''{0}'' on empty collection WollokDslInterpreter_native_class_not_found = You declared a native method but there is no native definition for {0} (maybe it is a pure Wollok definition) diff --git a/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages_es.properties b/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages_es.properties index b3c2448931..4d72d442bf 100644 --- a/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages_es.properties +++ b/org.uqbar.project.wollok/src/org/uqbar/project/wollok/messages_es.properties @@ -25,7 +25,7 @@ WollokInterpreter_operationNotSupported = Operaci\u00F3n '{0}' no soportada por WollokInterpreter_operatorNotSupported = {1} no soporta el operador {0} WollokInterpreter_constructorCallNotAllowed = No puede llamar a un constructor de algo que no sea una clase WollokInterpreter_binaryOperationNotCompoundAssignment = La operaci\u00F3n binaria no es una asignaci\u00F3n compuesta -WollokInterpreter_visualObjectWithoutPosition = El objeto visual no tiene posici\u00F3n: {0} +WollokInterpreter_visualObjectWithoutPosition = El objeto visual no tiene un atributo 'position': {0} WollokInterpreter_illegalOperationEmptyCollection = Operaci\u00F3n '{0}' no permitida en colecciones vac\u00EDas WollokDslInterpreter_native_class_not_found = Declar\u00F3 un \u00E9todo nativo pero no se encontr\u00F3 la definici\u00F3n nativa de {0} (posiblemente se trate de un elemento definido s\u00F3lo en Wollok)