Mastermind: Difference between revisions
m
→{{header|EasyLang}}
m (Minor code alteration.) |
|||
Line 1,143:
=={{header|EasyLang}}==
[https://easylang.
<syntaxhighlight lang="text">
# Mastermind:w90
#
col[] = [ 802 990 171 229 950 808 ]
len code[] 4
Line 1,194 ⟶ 1,196:
move 17 row * 11.5 + 7.5
line 60 row * 11.5 + 7.5
move 73.5 row * 11.5 + 7.5
color 310
Line 1,225 ⟶ 1,227:
.
.
color 531
linewidth 12
move 17 row * 11.5 + 7.5
line 60 row * 11.5 + 7.5
row += 1
if black = 4
Line 1,236 ⟶ 1,238:
.
if row = 8
timer 2
else
.
.
Line 1,246 ⟶ 1,248:
.
proc new . .
for i to 4
code[i] = random 6
Line 1,280 ⟶ 1,282:
circle 2
.
.
guess[1] = 1
Line 1,286 ⟶ 1,288:
guess[3] = 2
guess[4] = 2
.
proc do_move . .
c = (mouse_x - 15) div 12
guess[c + 1] = guess[c + 1] mod 6 + 1
.
on mouse_down
if row = -2
elif mouse_y > row * 11.5 + 0.5 and mouse_y < row * 11.5 + 10.5 and row < 8
if mouse_x > 15 and mouse_x < 61
elif mouse_x > 67 and mouse_x < 80
.
.
.
</syntaxhighlight>
|