Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lemeilleurjeudumonde
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
tacticalrpg
lemeilleurjeudumonde
Commits
e24ce81e
There was a problem fetching the pipeline summary.
Commit
e24ce81e
authored
8 years ago
by
Montjoie Henri
Browse files
Options
Downloads
Patches
Plain Diff
prise en compte des pts de deplacement
parent
782d4001
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/deplacements.c
+4
-1
4 additions, 1 deletion
src/deplacements.c
src/personnage.c
+1
-0
1 addition, 0 deletions
src/personnage.c
with
5 additions
and
1 deletion
src/deplacements.c
+
4
−
1
View file @
e24ce81e
...
...
@@ -20,7 +20,6 @@
boolean
case_a_cote
(
Personnage
*
perso
,
Case
*
destination
){
Case
*
depart
=
getPosition
(
perso
);
int
i
;
printf
(
"depart: %d, %d, arrivee: %d, %d"
,
get_x
(
depart
),
get_y
(
depart
),
get_x
(
destination
),
get_y
(
destination
));
if
(
get_x
(
depart
)
>
get_x
(
destination
)
+
1
||
get_x
(
depart
)
<
get_x
(
destination
)
-
1
||
get_y
(
depart
)
>
get_y
(
destination
)
+
1
||
get_y
(
depart
)
<
get_y
(
destination
)
-
1
){
return
faux
;
}
...
...
@@ -49,6 +48,10 @@ int deplacement_unitaire(Personnage *perso,Case * destination){
printf
(
"deplacement impossible : case infranchissable
\n
"
);
return
1
;
}
if
(
perso
->
points_deplacement
<
1
){
printf
(
"pas de points de deplacements"
);
return
1
;
}
if
(
case_a_cote
(
perso
,
destination
)
==
vrai
){
return
deplacer_personnage
(
perso
,
destination
);
}
...
...
This diff is collapsed.
Click to expand it.
src/personnage.c
+
1
−
0
View file @
e24ce81e
...
...
@@ -289,6 +289,7 @@ boolean est_paralyse(Personnage *p){
* \return un entier.
*/
int
deplacer_personnage
(
Personnage
*
perso
,
Case
*
destination
){
/*dplace un personnage d'une case une autre. Ne vrifie pas si le dplacement est autoris, cela doit tre fait par la fonction qui l'appelle*/
perso
->
points_deplacement
--
;
marquer_libre
(
getPosition
(
perso
));
perso
->
position
=
destination
;
marquer_occupee
(
getPosition
(
perso
));
...
...
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