//!-- description:"ice_cream_for_everyone/open_source_ice/ice_cream_generator/190600/version01/"
generated: 19/06/00 by Simon Pope & Mark Greco
ammended: 27/06/00 by Joshua Portway,
version: 003
extends version:
_____________________________________
licence:
ice_cream generator
Copyright (C) 2000 Ice Cream for Everyone
This program is free; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License is available from the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
http://www.gnu.org/copyleft/gpl.html
Contact 'Ice cream for Everyone' mark.greco@virgin.net
http://bak.spc.org/ice
_____________________________________
/* this is my first attempt at a java port of the code.
it's not perfect yet. and I'm unsure about some of the bits, but it's mostly
fairly reasonable java syntax and has some funny Java in-jokes in it.
I think I could also probably do a more sophisticated multi-threaded version
which would take into account the fact that you can be making the emulsifier while the milk
is boiling etc. it would probably be even less readable, though.
let me know if there are any mistakes in the cooking aspects (I'm not sure on a couple of points - see comments)
and I'll send you a more polished version.
love,
josh
*/
class FlavouredRichMilk extends Milk
{
Container container=new Pan(large);
public FlovouredRichMilk(int quantity)
{
VanillaPod aPod;
container.add(new Milk((pints) quantity));
container.add(new Butter((ounces) (quantitiy+(Random(2)*quantity))));
for(a=0;acool)
{
Thread.sleep(10000); // wait ten seconds
spoon.mix(this); // should we stir while cooling or not ?
}
container=new jug();
container.add(this);
System.fridge().add(container);
Thread.sleep(1000*60*60*8); // ie. eight hours (thread sleep pareameter is in milliseconds)
}
}
class IceCream extends Custard
{
public IceCream(float quantity)
{
super(quanitity); // ie make custard
Tool spatula=new Spatula(plastic);
FreezerBowl bowl=new FreezerBowl(); // is this one of those fancy bowls you found ? should that be explained somewhere ?
this.remove(vanillaPods);
bowl.add(this);
while(this.texture != frozen)
{
// god, this is difficult to code
spatula.scrape(bowl.sides());
spatula.spread(this, bowl.sides());
bowl.turn();
}
return; // done !!
}
}
class FreezerBowl extends Bowl
{
// somehow need to also express here that it's not a normal kind of bowl, and maybe where to get it
public FreezerBowl()
{
System.freezer().add(this);
Thread.sleep(1000*60*60*15); // fifteen hours
}
}
Mail changes to 'ice cream for everyone': mark.greco@virgin.net