mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 18:33:39 +02:00
Example client: Document the state structure
This commit is contained in:
parent
11511840bd
commit
043c92f850
1 changed files with 11 additions and 0 deletions
|
@ -18,6 +18,17 @@ use warnings;
|
||||||
$/ = "\r\n";
|
$/ = "\r\n";
|
||||||
|
|
||||||
|
|
||||||
|
# The example agent uses $state to hold its state structure. It is
|
||||||
|
# a HASHREF with the following fields:
|
||||||
|
# {
|
||||||
|
# tick => NUMBER (current tick id)
|
||||||
|
# energy => NUMBER (current energy)
|
||||||
|
# visual => [
|
||||||
|
# CHAR[2], ...
|
||||||
|
# ] (type-agent character pairs for perceived tiles)
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
# Read server input associated with a single tick and update the state
|
# Read server input associated with a single tick and update the state
|
||||||
# structure accordingly.
|
# structure accordingly.
|
||||||
sub tick($$) {
|
sub tick($$) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue