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
3bc5679c
Commit
3bc5679c
authored
1 year ago
by
Janos
Browse files
Options
Downloads
Patches
Plain Diff
Spieler kann nicht mehr auf einem Stein starten
parent
fb601b1d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hDateien/rows.h
+0
-2
0 additions, 2 deletions
hDateien/rows.h
map.c
+2
-0
2 additions, 0 deletions
map.c
rows.c
+1
-9
1 addition, 9 deletions
rows.c
with
3 additions
and
11 deletions
hDateien/rows.h
+
0
−
2
View file @
3bc5679c
...
...
@@ -14,8 +14,6 @@
//Declaration of functions
int
gen_stone
();
struct
Row
*
race
(
int
);
struct
Row
*
init_row
(
struct
Row
*
);
struct
Row
*
grass
(
bool
,
bool
,
int
);
...
...
This diff is collapsed.
Click to expand it.
map.c
+
2
−
0
View file @
3bc5679c
...
...
@@ -136,6 +136,8 @@ int move_map(enum vehicle theme,int delta_y,struct LinkedList *list, SDL_Rendere
player
->
y
+=
ROW_SIZE
;
player
->
x
-=
ROW_SIZE
;
playerscore
--
;
}
else
{
player
->
x
+=
ROW_SIZE
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
rows.c
+
1
−
9
View file @
3bc5679c
#include
"hDateien/rows.h"
// Vorbedingnug: /
// Nachbedingung: gibt eine zufällige Position für ein Stein zurück
int
gen_stone
(){
int
p
=
(
rand
()
%
9
)
*
ROW_SIZE
;
return
(
p
);
}
//Vorbedingung: -200<=y_pos<=1000
...
...
@@ -55,7 +47,7 @@ struct Row* grass(bool dark,bool gold,int y_pos){
int
p
=
rand
()
%
10
;
if
(
p
<
7
){
n
->
stone
=
gen_stone
()
;
n
->
stone
=
(
rand
()
%
9
)
*
ROW_SIZE
;
n
->
bird
=
NULL
;
}
else
{
p
=
(
rand
()
%
10
)
*
ROW_SIZE
;
...
...
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