level.c - simplier version

As I have written in comment, it's a working stage  version, because we
have problems with undestanding some parts of it.