Skip to content

Commit

Permalink
Updated README.md, fixed wall deletion bug, fixed trailing character …
Browse files Browse the repository at this point in the history
…bug, changed level display.
  • Loading branch information
aliclubb committed Jun 1, 2012
1 parent a760903 commit 8f67451
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
4 changes: 1 addition & 3 deletions games/maze/README.md
Expand Up @@ -8,6 +8,4 @@ BUGS

Yes, believe it or not some of my software has bugs -_-
So here's a list of them
When a wall is directly below you, pressing the down arrow key causes the character to move left by one.

When moving left or right, a trail of characters is left.
When a wall is directly below you, pressing the down arrow key causes the character to move left by one.
40 changes: 20 additions & 20 deletions games/maze/levels.dat
Expand Up @@ -6,26 +6,26 @@ void draw_maze(int level)
{
int row, column;
row = column = 0;
mvprintw(0, 0, "================================================================================");
mvprintw(1, 0, "=========================== =============== === === == =============");
mvprintw(2, 0, "================== ======= =============== === === == o ============");
mvprintw(3, 0, "================== ======= ====== ======= === === == =============");
mvprintw(4, 0, "================== ======= ====== ======= === === == =============");
mvprintw(5, 0, "================== ======= ====== === === == =============");
mvprintw(6, 0, "======== ======== ======= ====== === === =============");
mvprintw(7, 0, "======== ==== ====== ======= === === =============");
mvprintw(8, 0, "======== ==== ==== ====== ======= === === == =============");
mvprintw(9, 0, "======== ==== ===== === == =============");
mvprintw(10, 0, "======== ==== ======= ===== === == =============");
mvprintw(11, 0, "======== ==== ======= ========== ===== === === == =============");
mvprintw(12, 0, "======== ==== ======= ========== ======= === === == =============");
mvprintw(13, 0, "======== ======= ====== ======= === == =============");
mvprintw(14, 0, "============== ================ ====== ======= === === == =============");
mvprintw(15, 0, "============== ================ ====== ======= === === == =============");
mvprintw(16, 0, "============== ================ ================== === === == =============");
mvprintw(17, 0, "=============================== ================== === === == =============");
mvprintw(18, 0, "=============================== ================== === === == =============");
mvprintw(19, 0, "================================================================================");
mvprintw(0, 0, "................................................................................");
mvprintw(1, 0, "........................... ............... ... ... .. .............");
mvprintw(2, 0, ".................. ....... ............... ... ... .. o ............");
mvprintw(3, 0, ".................. ....... ...... ....... ... ... .. .............");
mvprintw(4, 0, ".................. ....... ...... ....... ... ... .. .............");
mvprintw(5, 0, ".................. ....... ...... ... ... .. .............");
mvprintw(6, 0, "........ ........ ....... ...... ... ... .............");
mvprintw(7, 0, "........ .... ...... ....... ... ... .............");
mvprintw(8, 0, "........ .... .... ...... ....... ... ... .. .............");
mvprintw(9, 0, "........ .... ..... ... .. .............");
mvprintw(10, 0, "........ .... ....... ..... ... .. .............");
mvprintw(11, 0, "........ .... ....... .......... ..... ... ... .. .............");
mvprintw(12, 0, "........ .... ....... .......... ....... ... ... .. .............");
mvprintw(13, 0, "........ ....... ...... ....... ... .. .............");
mvprintw(14, 0, ".............. ................ ...... ....... ... ... .. .............");
mvprintw(15, 0, ".............. ................ ...... ....... ... ... .. .............");
mvprintw(16, 0, ".............. ................ .................. ... ... .. .............");
mvprintw(17, 0, "............................... .................. ... ... .. .............");
mvprintw(18, 0, "............................... .................. ... ... .. .............");
mvprintw(19, 0, "................................................................................");
break;
}

Expand Down
27 changes: 20 additions & 7 deletions games/maze/maze.c
Expand Up @@ -30,7 +30,7 @@ int main (void)
y--;
move(y, x);
wall = inch();
if(wall == '=')
if(wall == '.')
{
getyx(stdscr, y, x);
y++;
Expand Down Expand Up @@ -68,7 +68,7 @@ int main (void)
y++;
move(y, x);
wall = inch();
if(wall == '=')
if(wall == '.')
{
getyx(stdscr, y, x);
y--;
Expand All @@ -86,7 +86,6 @@ int main (void)
move(y, x);
addch('@');
refresh();
x++;
move(y, x);
refresh();
}
Expand All @@ -104,7 +103,7 @@ int main (void)
x--;
move(y, x);
wall = inch();
if(wall == '=')
if(wall == '.')
{
getyx(stdscr, y, x);
x++;
Expand All @@ -113,7 +112,14 @@ int main (void)
}
else
{
mvprintw(y, x, "@");
x++;
move(y, x);
delch();
insch(' ');
getyx(stdscr, y, x);
x--;
move(y, x);
addch('@');
refresh();
move(y, x);
refresh();
Expand All @@ -126,7 +132,7 @@ int main (void)
x++;
move(y, x);
wall = inch();
if(wall == '=')
if(wall == '.')
{
getyx(stdscr, y, x);
x--;
Expand All @@ -135,7 +141,14 @@ int main (void)
}
else
{
mvprintw(y, x, "@");
x--;
move(y, x);
delch();
insch(' ');
getyx(stdscr, y, x);
x++;
move(y, x);
addch('@');
refresh();
move(y, x);
refresh();
Expand Down

0 comments on commit 8f67451

Please sign in to comment.