Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
project
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
Insarudo
project
Commits
d5e716b8
Commit
d5e716b8
authored
8 years ago
by
Liu Yiqun
Browse files
Options
Downloads
Patches
Plain Diff
Un peu d'avancement de la partie deroulement
parent
f0fc897c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/deroulement.c
+76
-0
76 additions, 0 deletions
src/deroulement.c
src/deroulement.h
+9
-0
9 additions, 0 deletions
src/deroulement.h
with
85 additions
and
0 deletions
src/deroulement.c
+
76
−
0
View file @
d5e716b8
#include
<stdio.h>
#include
<stdlib.h>
#include
"deroulement.h"
#include
"initialisation.h"
void
afficheDes
(
Joueur
*
current
)
{
int
i
;
printf
(
"Votre des sont:"
)
for
(
i
=
0
;
i
<
current
->
nombreDes
;
i
++
)
{
(
current
->
des
[
i
]
==
1
)
?
printf
(
"paco "
)
:
printf
(
"%d "
,
current
->
des
[
i
]);
}
}
void
afficheAnnonce
(
Annonce
*
debut
,
Joueur
*
premier
)
{
int
i
=
1
;
while
(
debut
!=
NULL
)
{
printf
(
"Le joueur
\"
%s\ a declare au moin %d des de"
,
premier
->
nom
,
&
debut
->
nombre
);
(
debut
->
valeur
==
1
)
?
printf
(
"paco "
)
:
printf
(
"%d"
,
debut
->
valeur
==
1
);
premier
=
premier
->
next
;
debut
=
debut
->
next
;
}
}
Annonce
*
listeAnnonce
(
Joueur
*
J
)
{
Annonce
*
a
,
head
;
Joueur
*
premier
=
J
;
printf
(
"Nous commencon a jouer par la declaration des annonces.
\n
"
);
printf
(
"Le permier joueur
\"
%s
\"
doit faire une proposition.
\n
"
,
J
->
nom
);
presenceJoueur
(
J
);
afficheDes
(
J
);
printf
(
"Quelle est votre valeur du de pour la proposition?(veuillez vous saisir 1 pour le paco)
\n
"
);
a
=
(
Annonce
*
)
malloc
(
sizeof
(
Annonce
));
head
=
a
;
scanf
(
"%d"
,
&
a
->
valeur
);
getchar
();
while
(
a
->
valeur
>
6
||
(
a
->
valeur
=
0
))
{
printf
(
"La valeur du de n'est pas valide!"
);
printf
(
"Veuillez-vous resaisir: "
);
scanf
(
"%d"
,
&
a
->
valeur
);
getchar
();
}
printf
(
"Quelle est votre nombre des des pour la proposition?
\n
"
);
scanf
(
"%"
,
a
->
nombre
);
getchar
();
while
(
a
->
nombre
>
5
*
numJoueur
||
(
a
->
nombre
=
0
))
{
printf
(
"Le nombre du de n'est pas valide!"
);
printf
(
"Veuillez-vous resaisir: "
);
scanf
(
"%d"
,
&
a
->
nombre
);
getchar
();
}
printf
(
"Donc votre declaration est qu'il y a au moin "
%
d
" des de "
%
d
" au total.
\n
"
,
&
a
->
nombre
,
&
a
->
valeur
);
while
(
1
)
{
JoueurSuivant
();
system
(
"clear"
);
J
=
J
->
next
;
presenceJoueur
(
J
);
afficheAnnonce
(
head
,
premier
);
printf
(
"Veuillez-vous saisir votre "
)
enum
choix
option
=
}
This diff is collapsed.
Click to expand it.
src/deroulement.h
+
9
−
0
View file @
d5e716b8
#include
<string.h>
enum
choix
{
surenchere
,
dudo
,
paco
};
//void afficheDes(Joueur* current);
//Annonce* listeAnnonce(Joueur* 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