#include "object.h"
Go to the source code of this file.
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. |
Definition in file object.c.
char* color | ( | char | cellId | ) |
Function that returns a string's pointer that contains the request object's color.
(Used to schema objects)
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().
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)
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().
bool isaccessible | ( | char | cellId | ) |
Function that check if the request object is accessible.
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().
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.
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().
unsigned short int weight | ( | char | cellId | ) |
Funtion that return the weight of the request object WARNING: An accessible object return weight 1.
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().