Skip to content
Snippets Groups Projects
Commit b605dd3d authored by Muhamed's avatar Muhamed
Browse files

feat: Implement core classes for Mars Rover simulation including Rover,...

feat: Implement core classes for Mars Rover simulation including Rover, MissionControl, Plateau, Map, and Telescope; add REST API specification
parent 34bebf88
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
.aider*
File moved
File moved
File moved
File moved
import sys import sys
import os import os
#from Pyscript import MissionControl, Plateau, Rover, Mars #from Pyscript import MissionControl, Plateau, Rover, Mars
from plateau import Plateau from Aider_implementation.plateau import Plateau
from mars import Mars from Aider_implementation.mars import Mars
from rover import Rover from Aider_implementation.rover import Rover
from mission_control import MissionControl from Aider_implementation.mission_control import MissionControl
from telescope import Telescope from Aider_implementation.telescope import Telescope
from map import Map from Aider_implementation.map import Map
import unittest import unittest
import telescope import Aider_implementation.telescope
# ---US01: Als Mars Mission Control möchte ich den Mars Rover steuern, um die grundlegende Interaktion und Kontrolle über den Rover zu ermöglichen. # ---US01: Als Mars Mission Control möchte ich den Mars Rover steuern, um die grundlegende Interaktion und Kontrolle über den Rover zu ermöglichen.
# TC01.01: Gültiger Vorwärtsbefehl: Überprüft, ob der Rover sich korrekt um ein Feld vorwärts bewegt, wenn der Befehl "F" empfangen wird. # TC01.01: Gültiger Vorwärtsbefehl: Überprüft, ob der Rover sich korrekt um ein Feld vorwärts bewegt, wenn der Befehl "F" empfangen wird.
......
rest.txt 0 → 100644
openapi: 3.0.3
info:
title: Drive Endpoint API
version: 1.0.0
description: >
A simple API endpoint that receives a command string and may return:
- the full command string
- a substring of the command string
- an empty response
paths:
/drive:
post:
summary: Process a string input
description: Accepts a string and returns either the same string, a substring of it, or nothing.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- input
properties:
input:
type: string
examples:
example1:
summary: Forward backward commands
value:
input: "FFFFBBB"
example2:
summary: Simple command string
value:
input: "FB"
example3:
summary: Alternating directions
value:
input: "RRRRLLLL"
example4:
summary: Mixed commands with invalid at the end
value:
input: "FBRLX"
example5:
summary: Unknown command at start
value:
input: "XFB"
responses:
'200':
description: Response may include the original string, a substring, or an empty string
content:
application/json:
schema:
type: object
properties:
output:
type: string
examples:
fullString:
summary: Full string returned
value:
output: "FFFFBBB"
subString:
summary: Substring returned
value:
output: "FBRL"
empty:
summary: Empty string returned
value:
output: ""
'400':
description: Bad request due to missing or invalid input
content:
application/json:
schema:
type: object
properties:
error:
type: string
example:
error: "Missing or invalid input"
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