Example #1
0
int main(int aroom_gridc, char *argv[])
{
    roomGrid roomStuff, *room_grid;
    room_grid = &roomStuff;

    progress puzzlesolved, *puzzle;
    puzzle = &puzzlesolved;

    Chicken Fowl, *hen;
    hen = &Fowl;

    FILE *map_file = NULL;
    map_file = fopen(argv[1], "r");

    if (map_file == NULL){
        printf("File could not be opened.\n");
        exit(1);
    }

    printf("File was opened.\n");

    makeRoom(room_grid, map_file);

    fclose(map_file);

    run_menu_screen(room_grid);

    run_main_game(room_grid, puzzle, hen);

    print_room_array(room_grid, puzzle);

    free_room_array(room_grid);

    return(0);
}
int
main ( /*int argc, char *argv[] */ )
{
  if (!initialize ())
    {
      return 1;
    }

  run_into_screen ();

  run_main_game ();

  deinitialize ();

  return 0;
}