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

unused dependency removed + docs improved

parent 0dd32f77
...@@ -30,7 +30,6 @@ INSTALLED_APPS = [ ...@@ -30,7 +30,6 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'widget_tweaks',
'core', 'core',
'visualization', 'visualization',
'ide', 'ide',
......
...@@ -20,3 +20,8 @@ ...@@ -20,3 +20,8 @@
.markdown-body dl dt { .markdown-body dl dt {
font-size: 1.2em; 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 [==[ ...@@ -63,12 +63,24 @@ return [==[
# for kind,items in module.kinds() do # for kind,items in module.kinds() do
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2> <h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
<table class="function_list"> <table class="function_list">
<thead>
<tr>
<td>
Function name
</td>
<td>
Description
</td>
</tr>
</thead>
<tbody>
# for item in items() do # for item in items() do
<tr> <tr>
<td class="name" $(nowrap)><a href="#$(item.name)">$(display_name(item))</a></td> <td class="name" $(nowrap)><a href="#$(item.name)">$(display_name(item))</a></td>
<td class="summary">$(M(item.summary,item))</td> <td class="summary">$(M(item.summary,item))</td>
</tr> </tr>
# end -- for items # end -- for items
</tbody>
</table> </table>
#end -- for kinds #end -- for kinds
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--- Every bot is allowed to store 100MB within the global namespace and the --- 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 --- data persists until the bot dies. So the bot can save data from frame
--- to frame. --- to frame.
--- <h2>Lua global namespace</h2>
--- <p>The following Lua standard functions are allowed:</p> --- <p>The following Lua standard functions are allowed:</p>
--- <p><a href="http://pgl.yoyo.org/luai/i/assert">assert</a>, --- <p><a href="http://pgl.yoyo.org/luai/i/assert">assert</a>,
--- <a href="http://pgl.yoyo.org/luai/i/print">print</a>, --- <a href="http://pgl.yoyo.org/luai/i/print">print</a>,
...@@ -58,21 +59,27 @@ ...@@ -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.remove">remove</a>,
--- <a href="http://pgl.yoyo.org/luai/i/table.sort">sort</a></p> --- <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> --- <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> --- <table>
--- <li>segment_radius (number): the size of the snake</li> --- <thead>
--- <li>mass (number): the weight of the snake</li> --- <tr><td>Variable within self</td><td>Type</td><td>Description</td></tr>
--- <li>sight_radius (number): the field of view of the snake, which increases with the size of the snake</li> --- </thead>
--- <li>consume_radius (number): the field of feed of the snake, which increases with the size of the snake</li> --- <tbody>
--- <li>max_step_angle (number): unknown definition</li> --- <tr><td>id</td><td>number</td><td>internal identifier</td></tr>
--- <li>start_frame (number): the game frame, when the snake was born</li> --- <tr><td>segment_radius</td><td>number</td><td>the size of the snake</td></tr>
--- <li>current_frame (number): the current game frame</li> --- <tr><td>mass</td><td>number</td><td>the weight of the snake</td></tr>
--- <li>speed (number): default speed is 1, but it can change if a snake is using boost</li> --- <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>
--- <li>food_consumed_natural (number): unknown definition</li> --- <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>
--- <li>food_consumed_hunted_self (number): unknown definition</li> --- <tr><td>max_step_angle</td><td>number</td><td>unknown definition</td></tr>
--- <li>food_consumed_hunted_by_others (number): unknown definition</li> --- <tr><td>start_frame</td><td>number</td><td>the game frame, when the snake was born</td></tr>
--- <li>colors ({number}): table of colors (default color is 0x0000FF00, maximum count is 100, set is available in <a href="#init">init</a>)</li> --- <tr><td>current_frame</td><td>number</td><td>the current game frame</td></tr>
--- <li>face (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li> --- <tr><td>speed</td><td>number</td><td>default speed is 1, but it can change if a snake is using boost</td></tr>
--- <li>logo (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li></ul> --- <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 function is called upon creation of a bot
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
Every bot is allowed to store 100MB within the global namespace and the 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 data persists until the bot dies. So the bot can save data from frame
to frame. to frame.
<h2>Lua global namespace</h2>
<p>The following Lua standard functions are allowed:</p> <p>The following Lua standard functions are allowed:</p>
<p><a href="http://pgl.yoyo.org/luai/i/assert">assert</a>, <p><a href="http://pgl.yoyo.org/luai/i/assert">assert</a>,
<a href="http://pgl.yoyo.org/luai/i/print">print</a>, <a href="http://pgl.yoyo.org/luai/i/print">print</a>,
...@@ -85,25 +86,42 @@ ...@@ -85,25 +86,42 @@
<a href="http://pgl.yoyo.org/luai/i/table.remove">remove</a>, <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> <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> <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> <table>
<li>segment_radius (number): the size of the snake</li> <thead>
<li>mass (number): the weight of the snake</li> <tr><td>Variable within self</td><td>Type</td><td>Description</td></tr>
<li>sight_radius (number): the field of view of the snake, which increases with the size of the snake</li> </thead>
<li>consume_radius (number): the field of feed of the snake, which increases with the size of the snake</li> <tbody>
<li>max_step_angle (number): unknown definition</li> <tr><td>id</td><td>number</td><td>internal identifier</td></tr>
<li>start_frame (number): the game frame, when the snake was born</li> <tr><td>segment_radius</td><td>number</td><td>the size of the snake</td></tr>
<li>current_frame (number): the current game frame</li> <tr><td>mass</td><td>number</td><td>the weight of the snake</td></tr>
<li>speed (number): default speed is 1, but it can change if a snake is using boost</li> <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>
<li>food_consumed_natural (number): unknown definition</li> <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>
<li>food_consumed_hunted_self (number): unknown definition</li> <tr><td>max_step_angle</td><td>number</td><td>unknown definition</td></tr>
<li>food_consumed_hunted_by_others (number): unknown definition</li> <tr><td>start_frame</td><td>number</td><td>the game frame, when the snake was born</td></tr>
<li>colors ({number}): table of colors (default color is 0x0000FF00, maximum count is 100, set is available in <a href="#init">init</a>)</li> <tr><td>current_frame</td><td>number</td><td>the current game frame</td></tr>
<li>face (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li> <tr><td>speed</td><td>number</td><td>default speed is 1, but it can change if a snake is using boost</td></tr>
<li>logo (number): not implemented yet (returns 0, set is available in <a href="#init">init</a>)</li></ul></p> <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></p>
<h2><a href="#Functions">Functions</a></h2> <h2><a href="#Functions">Functions</a></h2>
<table class="function_list"> <table class="function_list">
<thead>
<tr>
<td>
Function name
</td>
<td>
Description
</td>
</tr>
</thead>
<tbody>
<tr> <tr>
<td class="name" nowrap><a href="#init">init ()</a></td> <td class="name" nowrap><a href="#init">init ()</a></td>
<td class="summary">This function is called upon creation of a bot <td class="summary">This function is called upon creation of a bot
...@@ -125,6 +143,7 @@ ...@@ -125,6 +143,7 @@
<td class="name" nowrap><a href="#step">step ()</a></td> <td class="name" nowrap><a href="#step">step ()</a></td>
<td class="summary">That function is called each frame.</td> <td class="summary">That function is called each frame.</td>
</tr> </tr>
</tbody>
</table> </table>
......
Supports Markdown
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