Congratulations

Need space on that mug. :stuck_out_tongue:

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: :slight_smile:

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. :wink: (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 :slight_smile:

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. :slight_smile:

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. :stuck_out_tongue:

And the biscuits???