You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
363 B

#include "Snack.h"
#include <cstdlib>
using namespace std;
const unsigned int snackScore = 10;
void generateSnack(Point &snack){
int x, y;
x = rand() % GAME_RIGHT_WALL_X + 1;
y = rand() % GAME_BOTTOM_WALL_Y + 1;
snack.setPoint(y, x);
printChar(y, x, snack.getImg());
}
unsigned int getSnackScore(void){
return snackScore;
}