object.h File Reference

File containing the interface of object module. More...

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#include <malloc.h>
#include "define.h"

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

Go to the source code of this file.

Data Structures

struct  schemaProp
 Data struct containing the schama's properties. More...

Typedefs

typedef struct schemaProp schemaGame

Functions

unsigned short int weight (char cellId)
 Funtion that return the weight of the request object WARNING: An accessible object return weight 1.
bool isaccessible (char cellId)
 Function that check if the request object is accessible.
char * color (char cellId)
 Function that returns a string's pointer that contains the request object's color.
char * colorVisited (unsigned short int cellId)
 Function that returns a string's pointer that contains the request object's color during the game.
void visitCell (unsigned int row, unsigned int col)
 It's used to mark (with colors) the route made in the game: changed if the cell is VISITED from an UNVISITED cell or is VISITED from a cell that was alreay VISITED.

Variables

schemaGame schemaData
 Variable of type schemaGame that contains all the schema's properties.


Detailed Description

File containing the interface of object module.

Definition in file object.h.


Typedef Documentation

typedef struct schemaProp schemaGame

Definition at line 41 of file object.h.


Function Documentation

char* color ( char  cellId  ) 

Function that returns a string's pointer that contains the request object's color.

(Used to schema objects)

Returns:
Object color (char *).
Parameters:
cellId Id of the object in input

Definition at line 55 of file object.c.

References CLOSE, D5, DOOR, FREE, and START.

Referenced by colorVisited(), draw_brush(), and drawschema().

Here is the caller graph for this function:

char* colorVisited ( unsigned short int  cellId  ) 

Function that returns a string's pointer that contains the request object's color during the game.

(Used to mark cell along a route)

Returns:
Object color during the game (char *).
Parameters:
cellId Id of the object in input

Definition at line 83 of file object.c.

References color(), D5, FREE, UNVISITED, VISIT1, and VISIT2.

Referenced by drawschema(), and updateSchemaCell().

Here is the call graph for this function:

Here is the caller graph for this function:

bool isaccessible ( char  cellId  ) 

Function that check if the request object is accessible.

Returns:
Positive value (true) if the object is accessible. Negative value (false) otherwise.
Parameters:
cellId Id of the object in input

Definition at line 34 of file object.c.

References CLOSE, D5, DOOR, FREE, and START.

Referenced by checkKeyPressed(), schema_round_search(), and weight().

Here is the caller graph for this function:

void visitCell ( unsigned int  row,
unsigned int  col 
)

It's used to mark (with colors) the route made in the game: changed if the cell is VISITED from an UNVISITED cell or is VISITED from a cell that was alreay VISITED.

An eventually unknow value set the cell to UNVISITED.

Parameters:
row Cell row position
col Cell column position

Definition at line 109 of file object.c.

References D1, D5, schemaProp::numCol, schemaProp::numRow, schemaData, UNVISITED, VISIT1, VISIT2, and schemaProp::visitedCellInfo.

Referenced by updateSchemaCell().

Here is the caller graph for this function:

unsigned short int weight ( char  cellId  ) 

Funtion that return the weight of the request object WARNING: An accessible object return weight 1.

Returns:
Weight of the object (unsigned short int).
Parameters:
cellId Id of the object in input

Definition at line 10 of file object.c.

References CLOSE, D5, DOOR, FREE, isaccessible(), and START.

Referenced by drawingAndSetSchemaInfo(), new_tournament(), and updateSchemaCell().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation


Generated on Fri Apr 2 18:27:59 2010 for SMLabyrinth by  doxygen 1.5.8