From 23b5c7778fc4591c72360909bcb714b0b3aa28f6 Mon Sep 17 00:00:00 2001 From: rinaschedl Date: Wed, 29 Jul 2026 11:01:36 +0200 Subject: [PATCH 1/7] CATROID-1106: GlideToPositionBrick A new Brick (Feature) is created. The Brick has 3 options: -random position - the sprite glides to a random position -touch position - the player has to touch a position where the sprite then goes -other sprite position - the sprite glides and at the moment follows a other sprite till the other sprite stops. - this part is not finally discussed: may we change it so that the sprite goes to the startposition from the other sprite, if it moves too TestGlideToRandomPositionDestination Test; flact:red TestGlideToRandomPositionDestination flact:green; createGlidetoRandomPositionAction; Refactoring and knew Test: GlideBehavior, bove Tests are green show Brick in Bricklist with the correct attributs. Attributes don't work yet. changed all glide_to_.... to glide_to_position_... so to better distinguish between. last commit before PairProgramming Session with Thomas glideToTouchPosition ready, brick test by hand and the tests are grenn refactor the ActionTest: canceled all deprecated lines; correct misspellings; add GlideToOtherSpritePosition refactor GlideToRandomPositionAction.kt Refactoring all files that changed in the ticket Catroid-1106 Refactoring all files that changed in the ticket Catroid-1106 --- .idea/.name | 1 - .idea/codeStyles/Project.xml | 1 + .run/Pull Request Suite.run.xml | 15 +- .run/Testrunner Tests.run.xml | 19 +- .../actions/GlideToTouchPositionActionTest.kt | 110 +++++++ .../catrobat/catroid/common/BrickValues.java | 4 + .../catroid/content/ActionFactory.java | 283 ++++++++++-------- .../org/catrobat/catroid/content/Scope.kt | 2 +- .../GlideToOtherSpritePositionAction.kt | 64 ++++ .../actions/GlideToRandomPositionAction.kt | 62 ++++ .../actions/GlideToTouchPositionAction.kt | 70 +++++ .../content/bricks/GlideToPositionBrick.kt | 134 +++++++++ .../ui/fragment/CategoryBricksFactory.kt | 6 +- .../res/layout/brick_glide_to_position.xml | 75 +++++ catroid/src/main/res/values/strings.xml | 2 + .../GlideToOtherSpritePositionActionTest.kt | 104 +++++++ .../GlideToRandomPositionActionTest.kt | 111 +++++++ .../actions/GoToRandomPositionActionTest.kt | 2 +- gradle.properties | 3 + settings.gradle | 4 +- 20 files changed, 922 insertions(+), 150 deletions(-) delete mode 100644 .idea/.name create mode 100644 catroid/src/androidTest/java/org/catrobat/catroid/test/content/actions/GlideToTouchPositionActionTest.kt create mode 100644 catroid/src/main/java/org/catrobat/catroid/content/actions/GlideToOtherSpritePositionAction.kt create mode 100644 catroid/src/main/java/org/catrobat/catroid/content/actions/GlideToRandomPositionAction.kt create mode 100644 catroid/src/main/java/org/catrobat/catroid/content/actions/GlideToTouchPositionAction.kt create mode 100644 catroid/src/main/java/org/catrobat/catroid/content/bricks/GlideToPositionBrick.kt create mode 100644 catroid/src/main/res/layout/brick_glide_to_position.xml create mode 100644 catroid/src/test/java/org/catrobat/catroid/test/content/actions/GlideToOtherSpritePositionActionTest.kt create mode 100644 catroid/src/test/java/org/catrobat/catroid/test/content/actions/GlideToRandomPositionActionTest.kt diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 419372801c8..00000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Catroid \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 24cd8c6e312..874d47a4e60 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -6,6 +6,7 @@