Im new and creating a game in C++ and I have been given a sample program, and I am really confused. If anyone has the time to talk through or help me that would be great.
I basically can move my character left and right with the arrows but not up and down and wondered how I go about doing this.
1 2 3 4 5
void setSpotInitialCoordinates(Item& spot)
{ //set spot coordinates inside the grid at random at beginning of game
spot.y = Random(SIZEY - 2); //vertical coordinate in range [1..(SIZEY - 2)]
spot.x = Random(SIZEX - 2); //horizontal coordinate in range [1..(SIZEX - 2)]
} //end of setSpotInitialoordinates