Random map generation algorithm updated. Paint function improved.