Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pingouins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Bariatti Francesco
pingouins
Commits
addad0a9
Commit
addad0a9
authored
9 years ago
by
Romain Lebouc
Browse files
Options
Downloads
Patches
Plain Diff
methodes move_to_string et player_to_string ajoutées. to_string à finir.
parent
906e7ced
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/game/morpion.cpp
+16
-8
16 additions, 8 deletions
src/game/morpion.cpp
with
16 additions
and
8 deletions
src/game/morpion.cpp
+
16
−
8
View file @
addad0a9
...
...
@@ -112,17 +112,25 @@ namespace game
{
//TODO: Implement
}
/**
* player_to_string
* Retourne X si le joueur joue les croix, O s'il joue les ronds,
* et un espace sinon.
*/
string
morpion
::
player_to_string
(
uint8_t
player
)
const
{
//TODO: Implement
return
"TODO"
;
return
player
==
CROSS
?
"X"
:
(
player
==
CIRCLE
?
"O"
:
" "
);
}
string
morpion
::
move_to_string
(
uint16_t
m
)
const
{
//TODO: Implement
return
"TODO"
;
uint8_t
row
=
m
/
3
;
uint8_t
col
=
m
%
3
;
return
"( "
std
::
to_string
(
row
)
", "
std
::
to_string
(
col
)
" )"
;
}
set
<
int
>
morpion
::
to_input_vector
()
const
...
...
@@ -136,8 +144,8 @@ namespace game
string
morpion
::
to_string
()
const
{
//TODO: Implement
return
"TODO"
;
for
(
int
i
=
0
//TODO PAR ROMAIN
}
void
morpion
::
playout
(
mt19937
&
engine
,
int
max_depth
)
...
...
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