Commit 70fc5c74 authored by nachtgold's avatar nachtgold
Browse files

unused dependency removed + docs improved

parent 0dd32f77
......@@ -30,7 +30,6 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'widget_tweaks',
'core',
'visualization',
'ide',
......
......@@ -19,4 +19,9 @@
.markdown-body dl dt {
font-size: 1.2em;
}
table thead tr td {
background: rgb(0,0,0,.50);
font-weight: 700;
}
\ No newline at end of file
......@@ -63,12 +63,24 @@ return [==[
# for kind,items in module.kinds() do
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
<table class="function_list">
<thead>
<tr>
<td>
Function name
</td>
<td>
Description
</td>
</tr>
</thead>
<tbody>
# for item in items() do
<tr>
<td class="name" $(nowrap)><a href="#$(item.name)">$(display_name(item))</a></td>
<td class="summary">$(M(item.summary,item))</td>
</tr>
# end -- for items
</tbody>
</table>
#end -- for kinds
......
......@@ -2,6 +2,7 @@
--- 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.
--- <h2>Lua global namespace</h2>
--- <p>The following Lua standard functions are allowed:</p>
--- <p><a href="http://pgl.yoyo.org/luai/i/assert">assert</a>,
--- <a href="http://pgl.yoyo.org/luai/i/print">print</a>,
......@@ -58,21 +59,27 @@
--- <a href="http://pgl.yoyo.org/luai/i/table.remove">remove</a>,
--- <a href="http://pgl.yoyo.org/luai/i/table.sort">sort</a></p>
--- <p>Every snake can describe itself with the following attributes of the global variable <code>self</code>:</p>
--- <ul><li>id (number): internal identifier</li>
--- <li>segment_radius (number): the size of the snake</li>
--- <li>mass (number): the weight of the snake</li>
--- <li>sight_radius (number): the field of view of the snake, which increases with the size of the snake</li>
--- <li>consume_radius (number): the field of feed of the snake, which increases with the size of the snake</li>
--- <li>max_step_angle (number): unknown definition</li>
--- <li>start_frame (number): the game frame, when the snake was born</li>
--- <li>current_frame (number): the current game frame</li>
--- <li>speed (number): default speed is 1, but it can change if a snake is using boost</li>
--- <li>food_consumed_natural (number): unknown definition</li>
--- <li>food_consumed_hunted_self (number): unknown definition</li>
--- <li>food_consumed_hunted_by_others (number): unknown definition</li>
--- <li>colors ({number}): table of colors (default color is 0x0000FF00, maximum count is 100, set is available in <a href="#init">init</a>)</li>
--- <li>face (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li>
--- <li>logo (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li></ul>
--- <table>
--- <thead>
--- <tr><td>Variable within self</td><td>Type</td><td>Description</td></tr>
--- </thead>
--- <tbody>
--- <tr><td>id</td><td>number</td><td>internal identifier</td></tr>
--- <tr><td>segment_radius</td><td>number</td><td>the size of the snake</td></tr>
--- <tr><td>mass</td><td>number</td><td>the weight of the snake</td></tr>
--- <tr><td>sight_radius</td><td>number</td><td>the field of view of the snake, which increases with the size of the snake</td></tr>
--- <tr><td>consume_radius</td><td>number</td><td>the field of feed of the snake, which increases with the size of the snake</td></tr>
--- <tr><td>max_step_angle</td><td>number</td><td>unknown definition</td></tr>
--- <tr><td>start_frame</td><td>number</td><td>the game frame, when the snake was born</td></tr>
--- <tr><td>current_frame</td><td>number</td><td>the current game frame</td></tr>
--- <tr><td>speed</td><td>number</td><td>default speed is 1, but it can change if a snake is using boost</td></tr>
--- <tr><td>food_consumed_natural</td><td>number</td><td>unknown definition</td></tr>
--- <tr><td>food_consumed_hunted_self</td><td>number</td><td>unknown definition</td></tr>
--- <tr><td>food_consumed_hunted_by_others</td><td>number</td><td>unknown definition</td></tr>
--- <tr><td>colors</td><td>{number}</td><td>table of colors (default color is 0x0000FF00, maximum count is 100, set is available in <a href="#init">init</a>)</td></tr>
--- <tr><td>face</td><td>number</td><td>not implemented yet (returns 0, set is available in <a href="#init">init</a>)</td></tr>
--- <tr><td>logo</td><td>number</td><td>not implemented yet (returns 0, set is available in <a href="#init">init</a>)</td></tr></tr>
--- </tbody></table>
--- This function is called upon creation of a bot
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment