How to order a pizza
Posted: 01/02/2008 - 21:29
One of the birthday gifts i got this year was a folder with recipes from my friends, with a little text wishing me a happy birthday.
Here's one of the 'recipes' i got....
Here's one of the 'recipes' i got....
Code: Select all
bool main(void)
{
float cash;
float price;
int phoneNo;
cash = getContent(pocket.wallet);
price = getCost(table.menu.variant[32]);
if (cash >= price)
{
phoneNo = getNo(table.menu.no);
open(phone,stream::voice);
phone::write(phoneNo);
phone::wait(CONST_REPLY);
phone::write("HELLO\n");
phone::write("I want one no32, that is " + table.menu.variant[32] + ",");
phone::write("and I want it delivered to " + getHost::id(127.0.0.1));
close(phone);
}
while (!visit)
{
dream();
}
open(door, stream::irl);
door::open();
door::receiveItem(table.menu.variant[42]);
door::reportError(table.menu.variant[42] != table.menu.variant[32]);
door::sendItem(price - CONST_WRONG_MENU_ITEM_DEDUCTION);
door::close();
close(door);
if(isAllergic(table.menu.variant[42]))
{
die();
}
}