blob: 3f8d1d853a367df8c759354abd5b5d2ef0978410 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
\section{Introduction}
I assume you know the basics of Python:
printing stuff,
if/elif/else,
for and while loops and lists.
That’s really all you need to follow along at least the first four sections,
and then dictionaries will start to come in handy.
If you have no idea what I was just talking about, \emph{don’t panic}.
All that means is that you’re not quite ready for this yet,
and you need to start by learning Python using some of these excellent
resources:
\begin{itemize}
\item \url{http://openbookproject.net/thinkcs/python/english2e/}
\item \url{http://learnpythonthehardway.org/}
\item \url{http://docs.python.org/tutorial/}
\item Anyone you know who knows about Python, or is a programmer.
\end{itemize}
Don’t be discouraged if it doesn’t immediately make sense:
programming can be difficult and frustrating,
but if you put the effort in, it can also be a very rewarding, interesting and
fun activity.
If you are stuck with anything, Google it first.
You’ll need to start by getting the code.
The repository is at
\url{http://hg.flowblok.id.au/snakegame},
you can install it with pip:
\begin{minted}{sh}
$ pip install hg+http://hg.flowblok.id.au/snakegame#egg=SnakeGame
\end{minted}
Each section starts with a Fast track note:
if you know what you’re doing, just write a bot which moves according to what it
says in the fast track note, and you can skip that section.
|