Commit 6c3a1209 authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

fix bugs

parent c2f1d8ce
1111111111111111111111111111111111111111
1222222022627022222626222222202222622221
1222222022726022222626222222202222622221
1265622222202222222226722622220222220221
1222222222202202222262622622222222622221
1620022222222262222226226222262226222221
......
......@@ -179,6 +179,8 @@ void renderMap(map *m, int time) {
}
break;
case('7'):
if (m->grid[i][j+1] == '0')
m->grid[i][j] = 'h';
attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
......@@ -222,6 +224,30 @@ void renderMap(map *m, int time) {
m->grid[i][j] = '6';
}
break;
case('h'):
attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
if (time < 10)
mvprintw(3*j+k+1, 6*i+l+1, "%c", diamond[k][l]);
else if (time < 20)
mvprintw(3*j+k+1, 6*i+l+1, "%c", diamond2[k][l]);
else
mvprintw(3*j+k+1, 6*i+l+1, "%c", diamond3[k][l]);
attroff(COLOR_PAIR(7));
if (s == 6) {
if (m->grid[i][j+1] == '0') {
m->grid[i][j+1] = 'h';
m->grid[i][j] = '0';
} else if (m->grid[i][j+1] == '5') {
m->grid[i][j+1] = 'h';
m->grid[i][j] = '0';
dead = true;
} else
m->grid[i][j] = '7';
}
break;
case('x'):
attron(COLOR_PAIR(9));
for (k = 0; k < 3; k++)
......
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