Now that we have all the information required to build our game, let's start to change it. The first step is to change our world to a Euclidean torus with a fixed size. Here is a representation of a torus taken from the Wikipedia page:
To do this, we will need some information from inside the game, such as the world size. We will add the information inside the
Game class as two integer values,
const int _x, const _y;
We will initialize them with the constructor. So now, we need parameters for this class:
Game(int x=800, int y=600);
We will need to change our constructor implementation a bit, as shown in the ...