wayne-wang-1119 / Pirates-of-The-Caribbean

A simple game playing a pirate in a dungeon, to escape and win, find the treasure stashed in the dungeon
Apache License 2.0
0 stars 0 forks source link

Sweep: Change the tiles used in the game by using another image #27

Open wayne-wang-1119 opened 10 months ago

wayne-wang-1119 commented 10 months ago

Please change the tiles used in the game to another image, instead of the current one.

Checklist - [X] Create `byow/TileEngine/textures/new_image.png` ✓ https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/commit/84bd1de942fcaf934ab5d5559c18a56081270f7b [Edit](https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/edit/sweep/change_the_tiles_used_in_the_game_by_usi/byow/TileEngine/textures/new_image.png) - [X] Running GitHub Actions for `byow/TileEngine/textures/new_image.png` ✓ [Edit](https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/edit/sweep/change_the_tiles_used_in_the_game_by_usi/byow/TileEngine/textures/new_image.png) - [X] Modify `byow/TileEngine/Tileset.java` ✓ https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/commit/6f3200b2763256cf0aa302cf862cdcb0fb51e173 [Edit](https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/edit/sweep/change_the_tiles_used_in_the_game_by_usi/byow/TileEngine/Tileset.java#L23-L38) - [X] Running GitHub Actions for `byow/TileEngine/Tileset.java` ✓ [Edit](https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/edit/sweep/change_the_tiles_used_in_the_game_by_usi/byow/TileEngine/Tileset.java#L23-L38)
sweep-ai[bot] commented 10 months ago

🚀 Here's the PR! #29

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: a1ce6b4ce1)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).
Install Sweep Configs: Pull Request

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 8829aba
Checking byow/TileEngine/Tileset.java for syntax errors... ✅ byow/TileEngine/Tileset.java has no syntax errors! 1/1 ✓
Checking byow/TileEngine/Tileset.java for syntax errors...
✅ byow/TileEngine/Tileset.java has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/blob/8829abaeea9556c0416bf6c1473a24d8a77b2a41/byow/Core/Engine.java#L15-L35 https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/blob/8829abaeea9556c0416bf6c1473a24d8a77b2a41/byow/TileEngine/TETile.java#L23-L47 https://github.com/wayne-wang-1119/Pirates-of-The-Caribbean/blob/8829abaeea9556c0416bf6c1473a24d8a77b2a41/byow/TileEngine/Tileset.java#L1-L40

Step 2: ⌨️ Coding

Ran GitHub Actions for 84bd1de942fcaf934ab5d5559c18a56081270f7b:

--- 
+++ 
@@ -21,22 +21,22 @@
  */

 public class Tileset {
-    public static final TETile AVATAR = new TETile('@', Color.white, Color.black, "you", "byow/TileEngine/textures/Knight.png");
+    public static final TETile AVATAR = new TETile('@', Color.white, Color.black, "you", "byow/TileEngine/textures/new_image.png");
     public static final TETile WALL = new TETile('#', new Color(216, 128, 128), Color.darkGray,
-            "wall");
+            "wall", "byow/TileEngine/textures/new_image.png");
     public static final TETile FLOOR = new TETile('·', new Color(128, 192, 128), Color.black,
-            "floor");
-    public static final TETile NOTHING = new TETile(' ', Color.black, Color.black, "Out of Reach", "byow/TileEngine/textures/nothing.png");
-    public static final TETile GRASS = new TETile('"', Color.green, Color.black, "grass");
-    public static final TETile WATER = new TETile('≈', Color.blue, Color.black, "Hallway Floor", "byow/TileEngine/textures/stonefloor.png");
-    public static final TETile FLOWER = new TETile('❀', Color.magenta, Color.pink, "Treasure", "byow/TileEngine/textures/Chests.png");
+            "floor", "byow/TileEngine/textures/new_image.png");
+    public static final TETile NOTHING = new TETile(' ', Color.black, Color.black, "Out of Reach", "byow/TileEngine/textures/new_image.png");
+    public static final TETile GRASS = new TETile('"', Color.green, Color.black, "grass", "byow/TileEngine/textures/new_image.png");
+    public static final TETile WATER = new TETile('≈', Color.blue, Color.black, "Hallway Floor", "byow/TileEngine/textures/new_image.png");
+    public static final TETile FLOWER = new TETile('❀', Color.magenta, Color.pink, "Treasure", "byow/TileEngine/textures/new_image.png");
     public static final TETile LOCKED_DOOR = new TETile('█', Color.orange, Color.black,
-            "locked door");
+            "locked door", "byow/TileEngine/textures/new_image.png");
     public static final TETile UNLOCKED_DOOR = new TETile('▢', Color.orange, Color.black,
-            "unlocked door", "byow/TileEngine/textures/doors2.png");
-    public static final TETile SAND = new TETile('▒', Color.yellow, Color.black, "Room Floor", "byow/TileEngine/textures/room.png");
-    public static final TETile MOUNTAIN = new TETile('▲', Color.gray, Color.black, "Hallway Wall", "byow/TileEngine/textures/free_torches.png");
-    public static final TETile TREE = new TETile('♠', Color.green, Color.black, "Room Wall", "byow/TileEngine/textures/room_wall.png");
+            "unlocked door", "byow/TileEngine/textures/new_image.png");
+    public static final TETile SAND = new TETile('▒', Color.yellow, Color.black, "Room Floor", "byow/TileEngine/textures/new_image.png");
+    public static final TETile MOUNTAIN = new TETile('▲', Color.gray, Color.black, "Hallway Wall", "byow/TileEngine/textures/new_image.png");
+    public static final TETile TREE = new TETile('♠', Color.green, Color.black, "Room Wall", "byow/TileEngine/textures/new_image.png");

 }

Ran GitHub Actions for 6f3200b2763256cf0aa302cf862cdcb0fb51e173:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/change_the_tiles_used_in_the_game_by_usi.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord