Need space on that mug.
Or just at the bottom of the mug inside:
refill()
So when you drink all the coffee you can remember to get more!
The fun part is showing some Xojo syntax. A pure refill() can be anything, from Pascal to C#
Found a bug:
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.CoffeePot)
Dim bv As new Beverage(BevType.Coffee)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
If mug.almostEmpty() Then // 0 - 10% left
mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
else
me.drink(mug)
End
If pot.empty() Then
bv = new Beverage(BevType.Coffee)
pot.prepare(bv)
End
Wend
You guys really donāt have enough to do.
You still left the tea option out!!
I have, to sleep. Almost 1:00 AM.
Just one minute!
I donāt care about the time - I want my tea option!!!
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.TeaPot)
Dim bv As new Beverage(BevType.Tea)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
If mug.almostEmpty() Then // 0 - 10% left
mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
else
me.drink(mug)
End
If pot.empty() Then
bv = new Beverage(BevType.Tea)
pot.prepare(bv)
End
Wend
What about if I donāt feel like tea, but want a cup of hot chocolate???
Then add it to the type.
Could you add the possibility to dunk a biscuit???
You already played with MacOSLib, you are ready to implement ābiscuit dunkersā by yourself.
The source is about as open as you can get. Go to it.
Bye people, have a good night. (or whatever in your time zone)
[quote=107317:@Rick Araujo]
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.TeaPot)
Dim bv As new Beverage(BevType.Tea)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
If mug.almostEmpty() Then // 0 - 10% left
mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
else
me.drink(mug)
End
If pot.empty() Then
bv = new Beverage(BevType.Tea)
pot.prepare(bv)
End
Wend
[/quote]
Iām pretty sure I canāt fit all of this on a mug - maybe a Travel mug
I still want biscuit dunking capabilities built into that code!
Hey! Why the preference for the Tea version? Thatās the exclusive Richās version (ask $10 extra bucks from him for the Tea series).
This version reduces coffee wasting at end.
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.CoffeePot)
Dim bv As new Beverage(BevType.Coffee) // Let's get some COFFEE!
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
me.drink(mug)
While me.developing() // Xojo time!
If pot.empty() Then
bv = new Beverage(BevType.Coffee)
pot.prepare(bv)
End
If mug.almostEmpty() Then // 0 - 10% left
mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
else
me.drink(mug)
End
Wend // Snack time?
*Note for a Tea version just change the words Coffee and COFFEE by Tea and TEA.
And the biscuits???