# Notes from Wednesday, November 1

class Peacebot:

    def __init__(self, n, f):
        self.flowers = f
        self.name = n
        self.goodwill = 0

    def __str__(self):
        return self.name

    def speak(self):
        print "I am %s the Peacebot, and I have %d flowers." % \
              (self.name, self.flowers)

    def greet(self, otherBot):
        print "Greetings, %s!  I am %s." % (otherBot.name, self.name)

    def takeFlowers(self, howMany):
        self.flowers = self.flowers + howMany
        print "Groooooovy, thanks!"

    def offerFlowers(self, howMany, otherBot):
        self.greet(otherBot)
        print "Here, have %d flowers." % howMany
        self.flowers = self.flowers - howMany
        otherBot.takeFlowers(howMany)
        self.goodwill = self.goodwill + howMany
        
