Exemplo n.º 1
0
/* regroup */
static void reagrupe_ok_cb (GtkWidget *window )
{
	reagrupe_cant = (gint) gtk_range_get_adjustment(GTK_RANGE(reagrupe_hscale_cant))->value;

	if( reagrupe_cant > 0) {
		reagrupe_out( reagrupe_src, reagrupe_dst, reagrupe_cant );
	} else
		reagrupe_reset();

	gtk_widget_destroy(reagrupe_dialog);
}
Exemplo n.º 2
0
/* tells the server that my turn is over */
TEG_STATUS out_endturn()
{
    PLAYER_STATUS e;

    e = ESTADO_GET();
    if( e > PLAYER_STATUS_TURNOSTART && e < PLAYER_STATUS_TURNOEND ) {
        attack_reset();
        reagrupe_reset();
        ESTADO_SET( PLAYER_STATUS_IDLE );
        net_printf(g_game.fd,TOKEN_TURNO"\n");
    } else {
        textmsg( M_ERR,_("Error, it's not your turn."));
        return TEG_STATUS_ERROR;
    }
    return TEG_STATUS_SUCCESS;
}