Remote agent/Agent logic: Difference between revisions
m
syntax highlighting fixup automation
(→{{header|Wren}}: Oops, posted wrong code to this part of the task.) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 9:
=={{header|Go}}==
<
import (
Line 175:
agentBall = noColor
return
}</
Line 188:
mismatches second. Empty sectors are shown in blue, sectors with a matching ball are shown in green, and
sectors with a mismatching ball are shown in red.
<
use strict; # https://rosettacode.org/wiki/Remote_agent
Line 410:
(time - $start) / $turns * 1e6;
</syntaxhighlight>
=={{header|Phix}}==
<!--<
<span style="color: #000080;font-style:italic;">--
-- demo\rosetta\Remote_Agent_Agent_Logic.exw
Line 679:
<span style="color: #000000;">register_agent</span><span style="color: #0000FF;">(</span><span style="color: #000000;">get_command</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">accept_event</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">get_agent</span><span style="color: #0000FF;">)</span>
<!--</
For example output see [[Remote_agent/Simulation#Phix]]
Line 688:
Sample agent (''not'' a good or smart player of the game; just to show how to program to the interface).
{{works with|Tcl|8.6}}
<
package require RC::RemoteAgent
Line 744:
Agent new "localhost" 12345
vwait wonGame</
=={{header|Wren}}==
{{trans|Go}}
{{libheader|Wren-str}}
<
import "random" for Random
Line 891:
gameOver = drop.call()
}
}</
|