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
906e7ced
Commit
906e7ced
authored
9 years ago
by
Bariatti Francesco
Browse files
Options
Downloads
Patches
Plain Diff
Defined morpion state
parent
aefe25da
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
src/game/morpion.hpp
+6
-5
6 additions, 5 deletions
src/game/morpion.hpp
with
6 additions
and
5 deletions
src/game/morpion.hpp
+
6
−
5
View file @
906e7ced
...
...
@@ -11,6 +11,8 @@ namespace game
{
struct
morpion_state
{
uint16_t
cross_bitboard
=
0
;
uint16_t
circle_bitboard
=
0
;
uint8_t
total_moves
=
0
;
bool
first_player_win
=
false
;
bool
second_player_win
=
false
;
...
...
@@ -45,12 +47,11 @@ namespace game
private
:
inline
void
update_win
();
inline
bool
has_won
(
uint64_t
bitboard
);
inline
void
update_moves
(
uint16_t
move
);
inline
bool
get
(
uint64_t
bitboard
,
uint8_t
i
,
uint8_t
j
)
const
;
inline
bool
has_won
(
uint16_t
bitboard
);
inline
bool
get
(
uint16_t
bitboard
,
uint8_t
i
,
uint8_t
j
)
const
;
const
uint8_t
CROSS
=
0
;
const
uint8_t
CIRCLE
=
1
;
const
uint8_t
CROSS
=
1
;
const
uint8_t
CIRCLE
=
0
;
morpion_state
state
;
...
...
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