A friend is a luashka adapted for legendwar. What else did you want?
Moreover, I did it to myself in a cheat and decided to share it for crackers, and if we talk about experience, I've been doing C++ for 4 weeks, and for fucks (not osc) for about 10k years, and in general you are the father of programming who made programs for hacking schoolchildren's points, and no wait, you're im523. Not? Then do not touch the newcomers "Moderator".
If someone is not satisfied with this code, he can throw a well-deserved tomato and pass by.