Example #1
0
void PlayLoop( game g ) {
    while(pc_play(g)) {
        PrintAllBuildings(g->gameMap, g->pc->pos);
        move_zombies(g);
        update_alertness(g);
        bite_check(g);
    }
    char ch;
    while( ( g->pc->win || g->pc->health <= 0 ) && ! (( ch = getch() ) == 'q') ){
        // Let the player revel in their victory or failure.
    }
    wrefresh(g->arena);
    wrefresh(g->status);
}
Example #2
0
void
playlist_play_order(struct playlist *playlist, int orderNum)
{
	struct song *song;
	char *uri;

	playlist->playing = true;
	playlist->queued = -1;

	song = queue_get_order(&playlist->queue, orderNum);

	uri = song_get_uri(song);
	g_debug("play %i:\"%s\"", orderNum, uri);
	g_free(uri);

	pc_play(song);
	playlist->current = orderNum;
}
Example #3
0
void
playlist_play_order(struct playlist *playlist, struct player_control *pc,
		    int orderNum)
{
	char *uri;

	playlist->playing = true;
	playlist->queued = -1;

	struct song *song =
		song_dup_detached(queue_get_order(&playlist->queue, orderNum));

	uri = song_get_uri(song);
	g_debug("play %i:\"%s\"", orderNum, uri);
	g_free(uri);

	pc_play(pc, song);
	playlist->current = orderNum;
}