C implementation of the famous game