Game of a plane in C++