Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
board_state
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Antonio Andriella
board_state
Commits
a0f82c8e
Commit
a0f82c8e
authored
4 years ago
by
pal
Browse files
Options
Downloads
Patches
Plain Diff
Add 0 for to_location when a token is picked
parent
6980db49
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/board_state/main.py
+2
-2
2 additions, 2 deletions
src/board_state/main.py
with
2 additions
and
2 deletions
src/board_state/main.py
+
2
−
2
View file @
a0f82c8e
...
@@ -126,7 +126,7 @@ class BoardGame():
...
@@ -126,7 +126,7 @@ class BoardGame():
# if the location now is empty check where it was before
# if the location now is empty check where it was before
token_id
=
previous_board
.
get
(
k
)
token_id
=
previous_board
.
get
(
k
)
location
=
k
location
=
k
picked_token
=
(
str
(
token_id
),
str
(
location
))
picked_token
=
(
str
(
token_id
),
str
(
location
)
,
str
(
0
)
)
return
picked_token
return
picked_token
def
detect_placed_token
(
self
,
picked_token
,
current_board
):
def
detect_placed_token
(
self
,
picked_token
,
current_board
):
...
@@ -136,7 +136,7 @@ class BoardGame():
...
@@ -136,7 +136,7 @@ class BoardGame():
picked_token: the token the user has picked
picked_token: the token the user has picked
current_board: the status of the board at time t
current_board: the status of the board at time t
'''
'''
token_id
,
loc_from
=
picked_token
token_id
,
loc_from
,
_
=
picked_token
move_it_back
=
False
move_it_back
=
False
placed_token
=
()
placed_token
=
()
for
key
,
val
in
current_board
.
items
():
for
key
,
val
in
current_board
.
items
():
...
...
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