You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void testCreature::moveRight(creature* board[][ROWS]) //creature now knows what the world is because it is passed on in the arguments. Don't forget to check if creature has moved already.
{
if (board[_position.get_x()][_position.get_y()+1]==NULL)
{
board[_position.get_x()][_position.get_y()+1]=board[_position.get_x()][_position.get_y()]; //the slot next to original now also points at the original
board[_position.get_x()][_position.get_y()]=NULL; //points the original pointer to NULL now