Remote agent/Simulation: Difference between revisions

(Go solution)
Line 454:
a b c d e f g h</pre>
This displays the field colors in upper case letters, the balls in lower case letters, and the position of the agent with an asterisk.
 
=={{header|Run BASIC}}==
{{incorrect|Run BASIC|It does not seem to connect to the network, and it looks to be missing other basic elements from the task.}}
<lang runbasic>dim stats(10)
[loop]
cls
html "Please click a number or "
button #ex,"Exit",[exit]
print
for i = 1 to 10
val.i$ = "#val";i
link #val.i$ ,str$(i),[click]
html " Clicked:";stats(i);" times<br>"
next i
wait
 
[click]
num = val(mid$(EventKey$,5))
stats(num) = stats(num) + 1
goto [loop]
 
[exit]
Print "Thanks for playing... BYE!"</lang>
Client side sees stats of number of times each number is clicked
<pre>Please click a number or [Exit]
1 Clicked:1 times
2 Clicked:2 times
3 Clicked:3 times
4 Clicked:4 times
5 Clicked:0 times
6 Clicked:0 times
7 Clicked:0 times
8 Clicked:0 times
9 Clicked:1 times
10 Clicked:2 times
Thanks for playing... BYE!</pre>
 
=={{header|Tcl}}==
Anonymous user