Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
robot_behaviour
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
robot_behaviour
Commits
6c84666e
Commit
6c84666e
authored
5 years ago
by
Antonio Andriella
Browse files
Options
Downloads
Patches
Plain Diff
Change provide actions to user
parent
c5e57658
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/robot_behaviour/robot.py
+6
-10
6 additions, 10 deletions
src/robot_behaviour/robot.py
with
6 additions
and
10 deletions
src/robot_behaviour/robot.py
+
6
−
10
View file @
6c84666e
...
@@ -168,12 +168,13 @@ class Robot:
...
@@ -168,12 +168,13 @@ class Robot:
#speech.play_file(your_turn, 1)
#speech.play_file(your_turn, 1)
return
file
return
file
def
provide_lev_2_col
(
self
,
token
,
skt
,
speech
,
robot
,
file_Left
,
file_Center
,
file_Right
,
your_turn
):
def
provide_lev_2_col
(
self
,
token
,
skt
,
file_Left
,
file_Center
,
file_Right
,
your_turn
):
board_cols
=
skt
.
get_board_size
()[
1
]
board_cols
=
skt
.
get_board_size
()[
1
]
# we need to get the location of the current token
# we need to get the location of the current token
# and get the two that are closer
# and get the two that are closer
solution_location
=
skt
.
get_token_location
(
token
)
solution_location
=
skt
.
get_token_location_from_storage_rows
(
token
,
11
)
print
(
solution_location
,
board_cols
)
sentence
=
""
sentence
=
""
# if the right token is is the last column of the board
# if the right token is is the last column of the board
if
(
solution_location
==
(
board_cols
)
or
solution_location
==
((
2
*
board_cols
))
or
solution_location
==
(
if
(
solution_location
==
(
board_cols
)
or
solution_location
==
((
2
*
board_cols
))
or
solution_location
==
(
...
@@ -222,19 +223,14 @@ class Robot:
...
@@ -222,19 +223,14 @@ class Robot:
def
provide_congratulation
(
self
,
speech
,
file
):
def
provide_congratulation
(
self
,
speech
,
file
):
speech
.
play_file
(
file
,
4
)
speech
.
play_file
(
file
,
4
)
def
provide_pos_feedback
(
self
,
attempt
,
max_attempt
,
speech
,
robot
,
file
):
def
provide_pos_feedback
(
self
,
attempt
,
max_attempt
,
file
):
attempt
=
np
.
random
.
randint
(
0
,
max_attempt
)
#robot.head_noddling_yes()
#robot.head_noddling_yes()
#speech.play_file(file[attempt],2)
#speech.play_file(file[attempt],2)
return
file
[
attempt
]
return
file
[
attempt
]
def
provide_neg_feedback
(
self
,
attempt
,
max_attempt
,
speech
,
robot
,
file
):
def
provide_neg_feedback
(
self
,
attempt
,
max_attempt
,
file
):
attempt
=
np
.
random
.
randint
(
0
,
max_attempt
)
#robot.head_noddling_no()
#speech.play_file(file[attempt], 2)
return
file
[
attempt
]
return
file
[
attempt
]
def
provide_token_back
(
self
,
speech
,
file
):
def
provide_token_back
(
self
,
file
):
#speech.play_file(file, 2)
#speech.play_file(file, 2)
return
file
return
file
def
provide_game_completed
(
self
,
speech
,
file
):
def
provide_game_completed
(
self
,
speech
,
file
):
...
...
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