# The Game

## Controls

You can play &EasySok; with a keyboard or a mouse or both of them. Lets first look at the basic keyboard controls.

### Keyboard controls

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.

To move the keeper on field left, right, up or down just press the corresponding cursor key. 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.

Because it is time consuming to move the keeper only one field, there are some special keys assigned to more elaborate keeper movements.

First you can move the keeper in one direction until he hits a wall or a gem by pressing the cursor keys with Shift 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!

The next keys are for the movement of the virtual keeper. 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 cursor keys and Ctrl held down.

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 cursor keys with Shift and Alt 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.

### Mouse controls

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.

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.

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).

To undo the last move you can click the &RMB; and to redo a move click the &MMB;.

## Basic functions

### Undo and Redo

&EasySok; supports unlimited redo and undo of the moves you made. To undo the last move made, use Movement Undo move. You can redo a move with Movement Redo move. 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.

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.

You can undo all moves by Movement Jump to start. 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 Movement Jump to end.

### Automatic storing of games and solutions

&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. Levels Load best previous solution 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.

### Using a highscore server

&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 http://easysok.sourceforge.net/highscores. 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.

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.

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.