nSnake
A ncurses implementation of the classic Snake game
 All Data Structures Files Functions Variables Enumerations Macros Pages
Data Structures | Functions | Variables
fruit.h File Reference

Declaration of the fruit functions, defines and globals. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fruit_t
 The fruit structure. More...
 

Functions

void fruit_init ()
 Creates a fruit in a random place. More...
 
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

Declaration of the fruit functions, defines and globals.

Definition in file fruit.h.

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

Definition at line 44 of file fruit.c.