Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastermind-evo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan BALEV
mastermind-evo
Commits
f081317f
Commit
f081317f
authored
6 years ago
by
sbalev
Browse files
Options
Downloads
Patches
Plain Diff
Added text display
parent
fb919841
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sketchbook/test_toolkit/test_toolkit.pde
+7
-2
7 additions, 2 deletions
sketchbook/test_toolkit/test_toolkit.pde
with
7 additions
and
2 deletions
sketchbook/test_toolkit/test_toolkit.pde
+
7
−
2
View file @
f081317f
...
...
@@ -13,18 +13,22 @@ int code;
int
t
;
void
setup
()
{
size
(
310
,
5
6
0
);
size
(
310
,
5
7
0
);
background
(
191
);
code
=
int
(
random
(
M
));
tk
.
displayCode
(
code
,
GAP
,
GAP
,
PEG_SIZE
,
false
);
line
(
GAP
,
2
*
GAP
+
PEG_SIZE
,
GAP
+
4
*
PEG_SIZE
,
2
*
GAP
+
PEG_SIZE
);
println
(
tk
.
codeToString
(
code
));
println
(
"----"
);
t
=
0
;
}
void
draw
()
{
t
++
;
int
guess
=
int
(
random
(
M
));
int
y
=
GAP
+
(
GAP
+
PEG_SIZE
)
*
t
;
int
y
=
2
*
GAP
+
(
GAP
+
PEG_SIZE
)
*
t
;
tk
.
displayCode
(
guess
,
GAP
,
y
,
PEG_SIZE
,
false
);
print
(
tk
.
codeToString
(
guess
));
int
f
=
tk
.
feedback
(
code
,
guess
);
displayFeedback
(
f
,
2
*
GAP
+
N
*
PEG_SIZE
,
y
+
PEG_SIZE
/
4
);
if
(
f
==
0
||
t
==
10
)
noLoop
();
...
...
@@ -39,4 +43,5 @@ void displayFeedback(int f, int x, int y) {
rect
(
x
,
y
,
PEG_SIZE
/
2
,
PEG_SIZE
/
2
);
x
+=
PEG_SIZE
/
2
+
GAP
;
}
println
(
" "
,
bw
[
0
],
bw
[
1
]);
}
This diff is collapsed.
Click to expand it.
Preview
0%
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