More docs.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 26 Aug 2011 18:37:57 -0400
parents d65fe7dddf1f
children 4c1055d72377
branches/tags (none)
files docs/source/basics.rst docs/source/index.rst


diff -r d65fe7dddf1f -r cb2d6c82204a docs/source/basics.rst
--- a/docs/source/basics.rst	Fri Aug 26 18:25:34 2011 -0400
+++ b/docs/source/basics.rst	Fri Aug 26 18:37:57 2011 -0400
@@ -1,10 +1,45 @@
 Basic Concepts
-When you connect to a server you get a ``Bot`` object back.  You can connect with
-``(clojurecraft.core/connect {:name "hostname" :port INT} "username")``.
+The basic flow of creating a Minecraft bot with Clojurecraft looks like this:
+* Connect to a Minecraft server to get a ``Bot`` object.
+* Define and add events handlers to the bot.
+* Define and add loops to the bot.
+* Let the bot do its thing.
+* Disconnect the bot from the server.
+You can also manually tell a bot to perform actions from a REPL.
+You can connect to a Minecraft server with the ``connect`` function::
+    (clojurecraft.core/connect {:name "hostname" :port INT} "username")
+You can also pass ``nil`` as a username to get a random string of letters.
-Once you've got a bot you can query it for data about its world and tell it to
-perform actions.
+When you connect to a server you get a ``Bot`` object back.  Once you've got a bot
+you can query it for data about its world, tell it to perform actions, and add event
+handlers and loops.
+Event Handlers
+Event handlers are functions that let your bot react to things that happen in the
+world.  Check out the :doc:`Event Handlers </events>` page for more information.
+Loops are functions that run every ``N`` milliseconds and let your bot query the
+world and perform actions.  Check out the :doc:`Loops </loops>` page for more
+To disconnect a bot from the server you simply call the ``disconnect`` function::
+    (clojurecraft.core/disconnect bot)
diff -r d65fe7dddf1f -r cb2d6c82204a docs/source/index.rst
--- a/docs/source/index.rst	Fri Aug 26 18:25:34 2011 -0400
+++ b/docs/source/index.rst	Fri Aug 26 18:37:57 2011 -0400
@@ -9,7 +9,13 @@
 Check out the :doc:`Quick Start Guide </quickstart>` if you want to poke around.
+* Mercurial Repo: http://bitbucket.org/sjl/clojurecraft/
+* Git Repo: http://github.com/sjl/clojurecraft/
+* Documentation: http://clojurecraft.rtfd.org/
+* Issue Tracker: http://github.com/sjl/clojurecraft/issues/
+Table of Contents
 .. toctree::
    :maxdepth: 2
@@ -21,11 +27,3 @@
-Indices and tables
-* :ref:`genindex`
-* :ref:`search`