nSnake
A ncurses implementation of the classic Snake game
Functions | Variables
src/fruit.c File Reference

Definition of the fruit functions. More...

#include <stdlib.h>
#include <time.h>
#include "fruit.h"
#include "engine.h"
#include "player.h"
Include dependency graph for fruit.c:

Functions

void fruit_init ()
 Creates a fruit in a random place.
void fruit_update_bonus ()
 Drops the bonus value of the fruit for each 'frame'.

Variables

struct fruit_t fruit
 One global copy of the fruit.

Detailed Description

Definition of the fruit functions.


Function Documentation

void fruit_init ( )

Creates a fruit in a random place.

Note:
It doesn't verify if there is another fruit on the game
 All Data Structures Files Functions Variables Enumerations Defines