Auteur Topic: CSC goes international: Fanclub van Compuart  (gelezen 31249 keer)

Offline Daisy

  • Winnaar Vuelta Pool 2022
  • Forumlid
  • Geslacht: Vrouw
Re: CSC goes international: Fanclub van Compuart
« Reactie #60 Gepost op: 16-05-2004, 11:11:48 »
En?  ::)

Offline Dorine

  • Forumlid
  • Geslacht: Vrouw
Re: CSC goes international: Fanclub van Compuart
« Reactie #61 Gepost op: 16-05-2004, 16:44:29 »
Hoe zit het hier eigenlijk ??? leeft dit spel nog compuart ??? zit je er nog in ???
Best knap hoe Compuart net doet alsof hij dit topic niet volgt.

Ik wil zien hoe lang ie dat volhoudt!
En?  ::)

Never keep the fans awaiting!
Mijn prinsje is chriz!!

Offline Compuart

  • Realitynet.nl Administrator
  • *****
  • Geslacht: Man
  • SMF rulez!
Re: CSC goes international: Fanclub van Compuart
« Reactie #62 Gepost op: 18-05-2004, 14:28:25 »
Het spel is een beetje doodgebloed. Dingen gingen steeds langzamer lopen tot op een bepaald moment besloten is het spel te stoppen. In elk geval: ik zat nog bij de laatste 8 8) Sterker nog: ik had net nog een opdracht gewonnen ::trots::

Opdracht was als volgt:
Jij en je eilandgenoten hebben honger. Op het eiland van de lama's is voedsel in overvloed. Zoek met programmeertaal oplossing om voedsel te verkrijgen.
Ik hoop dat u nog objectief bent. Ik ben het in elk geval niet meer.

Offline Compuart

  • Realitynet.nl Administrator
  • *****
  • Geslacht: Man
  • SMF rulez!
Re: CSC goes international: Fanclub van Compuart
« Reactie #63 Gepost op: 18-05-2004, 14:28:39 »
En mijn oplossing was een eenvoudige :P
<?php
// Ok, let's start with some pre-assumptions. Let's just hope they are correct.
define('llama_island''not_too_far_away');
define('Joseph_Fung''cool_guy_if_he_lets_the_right_person_win_this_challenge');
define('easter_eggs''on_the_isle_of_the_llamas');
define('lots_of_food'32768);

// Get some randomness into this game.
srand((float) microtime() * 10000000);

// This is what survivor is all about, isn't it?
$appetite = array(
	
=> 'Not hungry',
	
=> 'Just a little hungry',
	
=> 'Almost an empty stomach',
	
=> 'Very hungry',
	
=> 'Starving',
	
=> 'Nearly dead'
);

// Thoughts (thank you Maslov).
$thoughts = array(
	
'shelter' => array(
	
	
'thinking' => 'It\'s freezing',
	
	
'need' => 'some place warmer',
	
	
'do' => 'build(\'hut\')'
	
),
	
'hungry' => array(
	
	
'thinking' => 'I\'m hungry!',
	
	
'need' => 'food',
	
	
'do' => 'employ_strategy(\'search_for_food\');'
	
),
	
'clothing' => array(
	
	
'thinking' => 'I\'m naked :o',
	
	
'need' => 'something to cover myself',
	
	
'do' => 'get_off(\'the_beach\');dress(\'quickly\');'
	
),
	
'security' => array(
	
	
'thinking' => 'The other contestants will kill me for stealing those bananas',
	
	
'need' => 'a bullet-proof vest',
	
	
'do' => 'stay(\'awake_and_paranoia\');'
	
)
);

// It's not looking good :-\
$food_supplies = array(
	
'zeal_island' => 150,
	
'palinola_island' => 5,
	
'zealinola_island' => 2,
	
'llama_island' => 32768
);

$current_contest_location 'zealinola_island';

// Ten survivors left.
$survivors = array('Compuart''Parham''$morph''Tyris''Owdy''Jeff Lewis''Bostasp''Killer Possum''Charlottezweb''AlienCowFarm');

// You realy don't wanna know what's in there. But we'll need it for retrieving some nasty details about our contestants.
include_once('./Sources/Misery/Contestants.php');

// Initialize the food we need.
$the_food_we_need 0;

foreach(
$survivors as $survivor)
{
	
// There you go. All your so much valued privacy stored into one global variable.
	
$survivor_info[$survivor] = loadSurvivor($survivor);

	
// Now everyone needs to think, so we add some random thoughts
	
$survivor_info[$survivor]['currently_thinking'] = $thoughts[array_rand($thoughts)];
	

	
// Here we are now...
	
$survivor_info[$survivor]['location'] = $current_contest_location;
	

	
// ...and this is what we all need.
	
$the_food_we_need += $survivor_info[$survivor]['my_daily_need_for_food'];
}

// So...let's check on our food supplies
if ($the_food_we_need $food_supplies[$current_contest_location])
{
	
// That's great, let's...
	
panic();
	

	
// At least the lack of food got everyone's attention
	
foreach (
$survivors as $survivor)
	
{
	
	
$survivor_info[$survivor]['currently_thinking'] = $thoughts['hungry'];
	
	
$survivor_info[$survivor]['current_appetite'] = $appetite[6];
	
}
	

	
// Let's act. 
	
foreach (
$survivors as $survivor)
	
	
eval(
$survivor_info[$survivor]['currently_thinking']['do']);

	
// At this point the problem is either solved, or the contestants have been starving to death.
	
do(
'nothing');
}

function 
employ_strategy($strategy)
{
	
// The global elements
	
global 
$earth$wind$fire$water;
	

	
if (
$strategy == 'search_for_food')
	
{
	
	
// Rule of thumb: always look at the llamas first
	
	
$result look_at('llama_island');
	
	
if (
$result['food_supplies'] >= lots_of_food)
	
	
{
	
	
	
// See! The rule of thumb worked! I knew it!
	
	
	
build('raft');
	
	
	

	
	
	
float_to('llama_island');
	
	
	

	
	
	
// What did you expect on a llama island?
	
	
	
if (
see('llama'))
	
	
	
{
	
	
	
	
// That's alright, perfectly human.
	
	
	
	
panic();
	
	
	
	

	
	
	
	
// Bugs bunny does this all the time...
	
	
	
	
if (
is_male('llama'))
	
	
	
	
	
distract('llama'show('fake_female_llama'));
	
	
	
	
else
	
	
	
	
	
distract('llama'show('fake_male_llama'));
	
	
	
	
drop('cage');
	
	
	
}
	
	
	

	
	
	
// Do what you have to do. This game has no rules.
	
	
	
steal('lots_of_food');
	
	
	

	
	
	
// We might be thieves, but we're still ethically correct thieves. So we leave some food for the llamas.
	
	
	
$food_supplies['zealinola_island'] += $food_supplies['llama_island'] - 5;
	
	
	
$food_supplies['llama_island'] = 5;
	
	
}
	
	
// With no food around, we have not much choice...
	
	
else
	
	
{
	
	
	
eat($earth['sand']);
	
	
	
die(
'starvation');
	
	
}
	
}
	
// Whatever your strategy is, it should be 'search_for_food', that's what survivor is about.
	
else
	
	
employ_strategy('search_for_food')
}
?>
Ik hoop dat u nog objectief bent. Ik ben het in elk geval niet meer.

Offline Dorine

  • Forumlid
  • Geslacht: Vrouw
Re: CSC goes international: Fanclub van Compuart
« Reactie #64 Gepost op: 18-05-2004, 14:39:56 »
Citaat
En mijn oplossing was een eenvoudige


ja eitje idd  ::)

maar jammer dat het doodgebloed is. Maar we hebben je onvoorwaardelijk geteund allemaal, tot het bittere eind.
Mijn prinsje is chriz!!

Offline Compuart

  • Realitynet.nl Administrator
  • *****
  • Geslacht: Man
  • SMF rulez!
Re: CSC goes international: Fanclub van Compuart
« Reactie #65 Gepost op: 18-05-2004, 16:47:44 »
Ja, jammer inderdaad. Nouja, meedoen is belangrijker dan winnen ::jaja:: ::pinokkio:: ;)

En jullie waren allemaal* geweldige supporters! ::bravo::





* Nouja, Bertha misschien iets minder dan
Ik hoop dat u nog objectief bent. Ik ben het in elk geval niet meer.

Offline Robin

  • Forumlid
  • Geslacht: Vrouw
Re: CSC goes international: Fanclub van Compuart
« Reactie #66 Gepost op: 18-05-2004, 21:25:04 »
als ik die oplossing zo zie... dan kan ik begrijpen dat het dood gebloed is  :-\\ ... kan er werkelijk geen chocola van maken ???
Augurken zijn net krokodillen!!!

Offline elise is de mol

  • Winnaar ER-pool 2003
  • Forumlid
  • Geslacht: Vrouw
Re: CSC goes international: Fanclub van Compuart
« Reactie #67 Gepost op: 18-05-2004, 21:51:47 »
als ik die oplossing zo zie... dan kan ik begrijpen dat het dood gebloed is  :-\\ ... kan er werkelijk geen chocola van maken ???

Het is een forum voor al die mensen die ook de progammacode voor zon forum als dit hebben gemaakt, dus die zullen het wel snappen.
"Fear of a name only increases fear of the thing itself." "Je jure solennellement que mes intentions sont mauvaises."