Commit b3b87589 authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Pedra agora cai para o lado

parent 3300f728
......@@ -170,6 +170,11 @@ void renderMap(map *m, int time) {
case('6'):
if (m->grid[i][j+1] == '0')
m->grid[i][j] = 'f';
if (m->grid[i][j+1] == '6' && m->grid[i+1][j] == '0' && m->grid[i+1][j+1] == '0')
m->grid[i][j] = 'r';
if (m->grid[i][j+1] == '6' && m->grid[i-1][j] == '0' && m->grid[i-1][j+1] == '0')
m->grid[i][j] = 'l';
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
......@@ -259,13 +264,57 @@ void renderMap(map *m, int time) {
attron(COLOR_PAIR(9));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
if(s < 7)
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion[k][l]);
else if(s < 14)
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion2[k][l]);
else
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion3[k][l]);
attroff(COLOR_PAIR(9));
if(s < 7)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", explosion[k][l]);
else if(s < 14)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", explosion2[k][l]);
else
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", explosion3[k][l]);
attroff(COLOR_PAIR(9));
break;
case('r'):
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
if (k == 0 && (l == 3 || l == 4)) {
attron(COLOR_PAIR(8));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]);
attroff(COLOR_PAIR(8));
} else {
attron(COLOR_PAIR(3));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]);
attroff(COLOR_PAIR(3));
}
}
}
if (s == 6) {
if (m->grid[i+1][j] == '0') {
m->grid[i+1][j] = 'f';
m->grid[i][j] = '0';
}
}
break;
case('l'):
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
if (k == 0 && (l == 3 || l == 4)) {
attron(COLOR_PAIR(8));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]);
attroff(COLOR_PAIR(8));
} else {
attron(COLOR_PAIR(3));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]);
attroff(COLOR_PAIR(3));
}
}
}
if (s == 6) {
if (m->grid[i-1][j] == '0') {
m->grid[i-1][j] = 'f';
m->grid[i][j] = '0';
}
}
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment