December 07
Ragazzi aiuto!! Sto ancora combattaendo con Vodafone, ma credo di aver capito la logica del 190... dopo 40 (diconsi quaranta) minuti di attesa ho distillato un algoritmo.
Solo per informatici o affini:
- On (customer_calls)
- {
- randomize();
- while (rand(0, 10) != 1)
- {
- play_music();
- say_stupid_things();
- }
- while (true)
- {
- if (is_luky(customer)) break;
- call(please_hold_on);
- }
- if (!is_luky(customer)) return -1;
- if (wants_to_pay(customer))
- {
- be_competent();
- be_polite();
- can_answer_questions(true);
- return 0;
- }
- else if (wants_to_complain(customer))
- {
- be_an_ass_hole();
- can_answer_questions(false);
- if (!is_luky(customer))
- {
- hang_up();
- return -1;
- }
- return 0;
- }
- else
- {
- say_bullshit(rand(0, 20));
- return 0;
- }
- return 1;
- }