Pieces of code, that could me useful in developing roguelike game