Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jumpNrun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wise2023_jumpnrun
jumpNrun
Commits
ac5519a1
Commit
ac5519a1
authored
1 year ago
by
Janos
Browse files
Options
Downloads
Patches
Plain Diff
Korrektur der Vorbedingung
parent
b527e9db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auto.c
+3
-2
3 additions, 2 deletions
auto.c
with
3 additions
and
2 deletions
auto.c
+
3
−
2
View file @
ac5519a1
...
@@ -74,7 +74,7 @@ struct Car* init_car(int speed,int width,int height,int pred_pos,int pred_width,
...
@@ -74,7 +74,7 @@ struct Car* init_car(int speed,int width,int height,int pred_pos,int pred_width,
}
}
// Vorbedinung:
// Vorbedinung:
// 0 < speed < 10, 0 < width < 500, 0 < height < 100,
// 0 <
|
speed
|
< 10, 0 < width < 500, 0 < height < 100,
// 0 <= start_pos <= 900
// 0 <= start_pos <= 900
// Nachbedingung: Initialisierte LinkedList von Autos, abhängig von den Parametern
// Nachbedingung: Initialisierte LinkedList von Autos, abhängig von den Parametern
...
@@ -218,8 +218,9 @@ void free_car(struct Row *n){
...
@@ -218,8 +218,9 @@ void free_car(struct Row *n){
// Bestimmt, ob es eine Kollision des Spielers mit einem Auto/Boot gibt
// Bestimmt, ob es eine Kollision des Spielers mit einem Auto/Boot gibt
// Funktion wird nur aufgerufem, wenn der Spieler in der gleichen Reihe mit dem Auto oder Boot ist
// Funktion wird nur aufgerufem, wenn der Spieler in der gleichen Reihe mit dem Auto oder Boot ist
// Im positiven Fall wird true zurück gegeben
// Vorbedingung: Spieler ist in der gleichen Reihe, wie das Fahrzeug
// Nachbedingung: Gibt true zurück, wenn sich der Spieler und das Auto überschneiden, sonst false
bool
kollision
(
int
x_pos
,
int
width
){
bool
kollision
(
int
x_pos
,
int
width
){
for
(
int
j
=
0
;
j
<
3
;
j
++
){
for
(
int
j
=
0
;
j
<
3
;
j
++
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment