diff options
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -8,7 +8,7 @@ static const char field_sample[field_height][field_width] = { {"////////////////////////////"}, {"/1....2.....1//1.....2....1/"}, {"/.////./////.//./////.////./"}, - {"/./ /./ /.//./ /./ /./"}, + {"/*/ /./ /.//./ /./ /*/"}, {"/./ /./ /.//./ /./ /./"}, {"/.////./////.//./////.////./"}, {"/2....3..2..2..2..2..3....2/"}, @@ -26,7 +26,7 @@ static const char field_sample[field_height][field_width] = { {"//////.// //////// //.//////"}, {"/1....3..2..1//1..2..3....1/"}, {"/.////./////.//./////.////./"}, - {"/.////./////.//./////.////./"}, + {"/*////./////.//./////.////*/"}, {"/1.1//2..2..y..y..2..2//1.1/"}, {"///.//.//.////////.//.//.///"}, {"///.//.//.////////.//.//.///"}, @@ -70,21 +70,24 @@ void print_field(game_space field) symbol = field[i][j]; move(i, j); switch(symbol) { - case '1': - case '2': - case '3': + case one_path: + case two_paths: + case three_paths: if(field_has_coin(i, j)) addch('.'); else addch(' '); break; - case '/': + case block: addch('/'); break; - case '.': + case coin: addch('.'); break; - case '#': + case energizer: + addch('*'); + break; + case door: addch('#'); break; } @@ -138,6 +141,7 @@ void clear_or_revert_symbol(game_space field, struct coordinates position, case door: addch('#'); break; + case energizer: case coin: queue_consists_point(eaten_coins, position) ? addch(' ') : addch('.'); |