<chapter id="game">
<title id="game.title">The Game</title>


<sect1 id="controls">
<title id="controls.title">Controls</title>
<para>
You can play &EasySok; with a keyboard or a mouse or both of them.
Lets first look at the basic keyboard controls.
</para>



<sect2 id="keyboardcontrols">
<title id="keyboardcontrols.title">Keyboard controls</title>
<para>
First we should note, that you can modify the keys used to move the keeper.
So the keys we describe here are the default keys.
</para>
<para>
To move the keeper on field left, right, up or down just press the corresponding
<keycap>cursor key</keycap>.
If a gem lies in the way of the keeper, it will be pushed, as long as the gem will
be moved on a empty field and otherwise the keeper move will not be performed.
In theory you can play the game only with these keys.
</para>
<para>
Because it is time consuming to move the keeper only one field, there are some
special keys assigned to more elaborate keeper movements.
</para>
<para>
First you can move the keeper in one direction until he hits a wall or a gem by
pressing the <keycap>cursor keys</keycap> with <keycap>Shift</keycap> held down.
If the keeper stands directly in front of a gem, this will move the gem in
one direction, until it hits a wall or another gem.
Just try it!
</para>
<para>
The next keys are for the movement of the <emphasis>virtual keeper</emphasis>.
Sometimes you want to move the keeper only a few fields, but the direct way 
is blocked by gems or walls.
Instead you have to move a long way through the maze.
This is where the virtual keeper comes into play.
The virtual keeper, unlike the normal keeper, can jump over walls and gems.
And whenever the virtual keeper reaches a field, which can also be reached
by the normal keeper, the virtual keeper vanishes and the normal keeper
will go to the position of the virtual keeper.
You can control the virtual keeper with the <keycap>cursor keys</keycap>
and <keycap>Ctrl</keycap> held down.
</para>
<para>
As you have read in the introduction, you cannot pull a gem. But what you
can do is, to simulate a pull by a push. This is what you do, when you
press the <keycap>cursor keys</keycap> with <keycap>Shift</keycap> and
<keycap>Alt</keycap> held down.
Note that the pull is only simulated within the rules of sokoban.
Try it yourself, to see how it works and when it doesn't work.
</para>
</sect2>



<sect2 id="mousecontrols">
<title id="mousecontrols.title">Mouse controls</title>
<para>
To move the keeper on a field, just click on the field with the &LMB;
and the keeper will move to this field, if there is a legal way without moving
gems.
</para>
<para>
Alternatively you can drag the keeper to a new position by pressing the &LMB;
over the field with the keeper, moving the mouse with the button pressed and
releasing the button over the destination field.
Like the above mentioned method, this works only if the keeper can reach the end field
without moving a gem.
</para>
<para>
In much the same way you can move a gem. Just drag it (&LMB; held down) to the
new position. The keeper will try to do the needed movements for you (this is where
you have a lot less work to do than the keyboard users, because the keeper is very
clever in finding a possible way and tries to do everything apart from pushing another
gem).
</para>
<para>
To undo the last move you can click the &RMB; and to redo a move click the &MMB;.
</para>
</sect2>
</sect1>


<sect1 id="basicfunctions">
<title id="basicfunctions.title">Basic functions</title>

<sect2 id="undoredo">
<title id="undoredo.title">Undo and Redo</title>
<para>
&EasySok; supports unlimited redo and undo of the moves you made. To undo the
last move made, use <menuchoice><guimenu>Movement</guimenu><guimenuitem>Undo
move</guimenuitem></menuchoice>.
You can redo a move with <menuchoice><guimenu>Movement</guimenu><guimenuitem>Redo
move</guimenuitem></menuchoice>.
If you make a move, all redo moves are normally erased.
The only exception to this behavior is, when the move you made is the same as
the redo operation would have given.
Then the move is essentially considered a redo move.
</para>
<para>
The undo and redo functions are also used to move through the movements of a loaded
game or the solution provided by the builtin solver.
</para>
<para>
You can undo all moves by <menuchoice><guimenu>Movement</guimenu><guimenuitem>Jump
to start</guimenuitem></menuchoice>.
This is useful, if you find yourself trapped in a deadlock and want to restart the
level.
Analog you can jump to the last move by <menuchoice><guimenu>Movement</guimenu>
<guimenuitem>Jump to end</guimenuitem></menuchoice>.
</para>
</sect2>


<sect2 id="gameloadstore">
<title id="gameloadstore.title">Automatic storing of games and solutions</title>
<para>
&EasySok; automatically stores every solution of a level you made.
It also stores the last attempt you made for every level.
So it is save, just to quit a &EasySok; or jump to another level in the middle
of a game, because if you later will go the the level, the moves you have made
are remembered.
You can move through the moves with undo and redo like described above.
You can also load a previous solution for a level.
<menuchoice><guimenu>Levels</guimenu><guimenuitem>Load best previous solution
</guimenuitem></menuchoice> loads the best previous solution.
The best solution is the one with the lowest number of pushes (if two solutions
have the same number of pushes, the one with the lowest number of moves is
considered better).
Note that the solutions are stored for a specific map, so if you have the same
map in two collections, both are considered solved.
</para>
</sect2>

<sect2 id="highscore-server">
<title id="highscore-server.title">Using a highscore server</title>
<para>
&EasySok; allows you to send your best solutions for a particular level
to a highscore server, where it will be stored and can be compared to
other solutions from other users which use the same highscore server.
Currently the only available highscoreserver has the URL
<ulink url="http://easysok.sourceforge.net/highscores">http://easysok.sourceforge.net/highscores</ulink>.
But first you must obtain an 'account' on that server.
This can be done via &solutions-create-user;. Note that the password
you give to the new user is stored in plaintext in the &EasySok; configuration
file, so please don`t use the same password for your account on your machine!
You can even create more than one user (maybe on different servers), but only
one is considered the current user.
If you have created an user from another machine, you can also import that user.
</para>
<para>
Because the communication with the highscore server is implemented in terms of
the http protocoll, you cannot user the highscore server if you cannot connect
to it by a normal webbrowser.
</para>
<para>
If you have to use a proxy server to connect to webservers (because you may
be behind a firewall), you can also make &EasySok; use this proxy server to
connect to the highscore servers.
</para>
</sect2>

</sect1>
</chapter>
