Number Crush  1.0
..
Functions
gridmanagement.h File Reference

Set of usefull functions for the grid management. More...

#include <string>
#include "Correc_prof/type.h"
#include "Correc_prof/nsutil.h"
Include dependency graph for gridmanagement.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ClearScreen ()
 Clear the current terminal.
 
void Color (const std::string &Col)
 Set the color of the future input in the terminal. More...
 
void DisplayGridWithLineAndColumnNumbersAndColor (const CMat &Mat, const CMyParam &Params)
 Display the grid showing the line and the column numbers. Everything is colored according to the set of parameters. More...
 
void DisplayGridWithLineAndColumnNumbers (const CMat &Mat)
 Display the grid showing the line and the column numbers. More...
 
void DisplayGrid (const CMat &Mat, const CMyParam &Params, bool ShowLineNumber=true, bool ShowColor=true)
 Display the grid according to the parameters. More...
 
void InitGrid (CMat &Grid, const unsigned &Size)
 Initialize the grid according to the size. More...
 

Detailed Description

Set of usefull functions for the grid management.

Author
Alain Casali
Marc Laporte
Version
1.0
Date
22 Janvier 2018

Definition in file gridmanagement.h.

Function Documentation

void Color ( const std::string &  Col)

Set the color of the future input in the terminal.

Parameters
[in]Col: Next color to be used

Here is the caller graph for this function:

void DisplayGrid ( const CMat Mat,
const CMyParam Param,
bool  ShowLineNumber,
bool  ShowColor 
)

Display the grid according to the parameters.

Parameters
[in]Mat: Game grid
[in]Params: : List of usefull parameters
[in]ShowLineNumber: true if we want to show line and color numbers, false otherwise.
[in]ShowColor: true if we want to color the grid, false otherwise.

Definition at line 96 of file gridmanagement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void DisplayGridWithLineAndColumnNumbers ( const CMat Mat)

Display the grid showing the line and the column numbers.

Parameters
[in]Mat: Game grid
Deprecated:
Do not use this function, it's just for debugging

Definition at line 75 of file gridmanagement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void DisplayGridWithLineAndColumnNumbersAndColor ( const CMat Mat,
const CMyParam Param 
)

Display the grid showing the line and the column numbers. Everything is colored according to the set of parameters.

Parameters
[in]Mat: Game grid
[in]Params: List of usefull parameters

Definition at line 23 of file gridmanagement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InitGrid ( CMat Grid,
const unsigned &  Size 
)

Initialize the grid according to the size.

Parameters
[out]GridGame grid to be initalized
[in]Size: Number of rows / columns of the grid (supposed to be squared)

Here is the caller graph for this function: