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.

21 lines
363 B

  1. #include "Snack.h"
  2. #include <cstdlib>
  3. using namespace std;
  4. const unsigned int snackScore = 10;
  5. void generateSnack(Point &snack){
  6. int x, y;
  7. x = rand() % GAME_RIGHT_WALL_X + 1;
  8. y = rand() % GAME_BOTTOM_WALL_Y + 1;
  9. snack.setPoint(y, x);
  10. printChar(y, x, snack.getImg());
  11. }
  12. unsigned int getSnackScore(void){
  13. return snackScore;
  14. }