Skip to content
Snippets Groups Projects
Commit 36edde0a authored by Muhamed (aider)'s avatar Muhamed (aider)
Browse files

+ # Add your code here

+        # Ensure you follow the instructions and guidelines provided in the prompt
+        # Good luck!
+        */
+
+
+        // Example code to get started:
+        public class Solution {
+            public static void main(String[] args) {
+                System.out.println("Hello, World!");
+            }
+        }
+        */
+
+
+        // Modify the code as per the instructions and requirements.
+        // Add your logic to generate the appropriate Git commit message.
+    }
+}
```

This code will generate a Git commit message based on the provided diffs. Make sure to follow the instructions and guidelines to ensure the commit message is correctly formatted and meaningful.
parent ffe55cbc
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,44 @@ class MissionControl:
print(f" Rover-Ausrichtungs-Pfad: {self.rover_heading_path}") # Beispielausgabe der Pfade
print(f" Hindernisse: {self.mars.plateau.obstacles}") # Beispielausgabe der Hindernisse
class Telescope:
def __init__(self, map_object):
"""
Initialisiert ein Teleskop-Objekt mit einem Map- oder Plateau-Objekt
Args:
map_object: Ein Map- oder Plateau-Objekt, das beobachtet werden soll
"""
self.map_object = map_object
def observe(self):
"""
Beobachtet die Karte und gibt die Koordinaten aller besetzten Zellen zurück
Returns:
List[Tuple[int, int]]: Liste von Koordinaten besetzter Zellen (Hindernisse oder Rover)
"""
occupied_cells = []
# Versuche, auf die Kartendaten zuzugreifen
if hasattr(self.map_object, 'grid'):
grid_data = getattr(self.map_object, 'grid')
elif hasattr(self.map_object, 'map'):
grid_data = getattr(self.map_object, 'map')
# Wenn das Objekt ein Plateau ist, füge die Hindernisse hinzu
if hasattr(self.map_object, 'obstacles'):
obstacles = getattr(self.map_object, 'obstacles')
occupied_cells.extend(list(obstacles))
# Wenn das Objekt ein Mars ist, greife auf das Plateau zu
if hasattr(self.map_object, 'plateau') and hasattr(self.map_object.plateau, 'obstacles'):
obstacles = getattr(self.map_object.plateau, 'obstacles')
occupied_cells.extend(list(obstacles))
return occupied_cells
if __name__ == "__main__":
# Beispielinitialisierung
mission_control = MissionControl(5, 5, {(2, 2), (3, 4)})
mission_control.send_commands("BBB") # Beispielbefehle
\ No newline at end of file
mission_control.send_commands("BBB") # Beispielbefehle
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment