Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Loic Guegan
ochess
Commits
70b397b8
Commit
70b397b8
authored
Nov 22, 2020
by
Loic Guegan
Browse files
Debug history
parent
6de7c020
Pipeline
#219660489
passed with stage
in 8 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
src/model/History.cpp
src/model/History.cpp
+1
-0
src/model/Move.cpp
src/model/Move.cpp
+1
-1
No files found.
src/model/History.cpp
View file @
70b397b8
...
...
@@ -7,6 +7,7 @@ History::History(std::string FEN) :
SavedState
(
NULL
)
{
InitialState
.
FEN
=
FEN
;
CurrentState
=
&
InitialState
;
InitialState
.
isWhite
=
false
;
// Very important otherwise the first move will be black
}
bool
History
::
Next
(
Board
<
PPiece
>
*
board
,
FenState
*
state
)
{
if
(
!
CurrentState
->
IsLeaf
())
{
...
...
src/model/Move.cpp
View file @
70b397b8
...
...
@@ -54,7 +54,6 @@ namespace ochess
}
void
Move
::
expand
(
Move
*
m
)
{
m
->
isWhite
=!
this
->
isWhite
;
if
(
this
->
main
==
nullptr
){
this
->
main
=
m
;
this
->
editorMove
.
next
=&
(
m
->
editorMove
);
...
...
@@ -64,6 +63,7 @@ namespace ochess
this
->
editorMove
.
variations
.
push_back
(
&
m
->
editorMove
);
}
m
->
parent
=
this
;
m
->
isWhite
=!
(
this
->
isWhite
);
}
bool
Move
::
operator
==
(
const
Move
&
m
){
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment