Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jochen Bauer
spn-website
Commits
eaf536b4
Commit
eaf536b4
authored
May 02, 2018
by
nachtgold
Committed by
Hubert Denkmair
May 03, 2018
Browse files
lua doc memory hint added
parent
10bc055b
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/lua/sample.lua
View file @
eaf536b4
--- This is a brief overview of all usable functions within the bot logic.
--- Every bot is allowed to store 100MB within the global namespace and the
--- data persists until the bot dies. So the bot can save data from frame
--- to frame.
--- That method is called each frame.
-- Here you can implement you bot logic. The return value must be an radiant angle.
...
...
docs/templates/docs/docs.html
View file @
eaf536b4
...
...
@@ -21,7 +21,10 @@
<div
id=
"docs_content"
>
<p>
This is a brief overview of all usable functions within the bot logic.
</p>
<p></p>
<p>
Every bot is allowed to store 100MB within the global namespace and the
data persists until the bot dies. So the bot can save data from frame
to frame.
</p>
<h2><a
href=
"#Functions"
>
Functions
</a></h2>
...
...
@@ -29,6 +32,11 @@
<tr>
<td
class=
"name"
nowrap
><a
href=
"#step"
>
step ()
</a></td>
<td
class=
"summary"
>
That method is called each frame.
</td>
</tr>
<tr>
<td
class=
"name"
nowrap
><a
href=
"#init"
>
init ()
</a></td>
<td
class=
"summary"
>
This method is called upon creation of a bot
Initialialize your environment here.
</td>
</tr>
<tr>
<td
class=
"name"
nowrap
><a
href=
"#findFood"
>
findFood (max_distance, minimum_food_value)
</a></td>
...
...
@@ -67,10 +75,26 @@
<h4>
Usage:
</h4>
<ul>
<pre
class=
"usage"
><code
class=
"lua"
>
<span
class=
"keyword"
>
function
</span>
step()
<span
class=
"keyword"
>
return
</span>
<span
class=
"number"
>
4
5
</span>
<span
class=
"keyword"
>
return
</span>
<span
class=
"number"
>
0.00
5
</span>
<span
class=
"keyword"
>
end
</span></code></pre>
</ul>
</dd>
<dt>
<a
name =
"init"
></a>
<strong>
init ()
</strong>
</dt>
<dd>
This method is called upon creation of a bot
Initialialize your environment here.
you can also access the "self" object here and, e.g. set your snake's colors
</dd>
<dt>
<a
name =
"findFood"
></a>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment