commencement menu + addaptatif

This commit is contained in:
2024-12-21 11:45:49 +01:00
parent 40640698f7
commit 7f9433f505
12 changed files with 95 additions and 27 deletions

View File

@@ -17,17 +17,18 @@
/**
* \brief La fonction permet d'afficher simplement le plateau de jeu dans le
* terminal.
* \param tab Le tableau 2d carre du plateau.
* \param size La taille du plateau.
* \param tab Le tableau 2d du plateau.
* \param x Le mombre de ligne.
* \param y Le nombre de colonnes.
* \return Void
*/
void screenDisplay (char **tab, int size)
void screenDisplay (char **tab, int x ,int y )
{
// puts("0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 ");
char element[7] = { ' ', '#', 'S', '.', '*', '@', '+' };
for (int i = 0; i < size; ++i)
char element[7] = { '#', '_', 'S', '.', '*', '@', '+' };
for (int i = 0; i < x; ++i)
{
for (int j = 0; j < size; ++j)
for (int j = 0; j < y; ++j)
{
printf ("%c ", element[(int)tab[i][j]]);
}