def __init__(self):
     self.weapon = Weapon()
     self.jewel = Jewel()
     self.head = Head()
     self.chest = Chest()
     self.legs = Legs()
     self.shoes = Shoes()
     self.loot = []
Example #2
0
def main(argv):
    noofhair = ''
    radiusofhead = ''
    left_eye_radius = ''
    right_eye_radius = ''

    try:
        opts, args = getopt.getopt(argv, "hf:", ["head="])
    except getopt.GetoptError:
        usage()
        sys.exit(2)

    for opt, arg in opts:
        if (opt == "-h"):
            usage()
            sys.exit()
        elif opt in ("-f", "--head"):
            noofhair = argv[1]
            radiusofhead = argv[2]
            left_eye_radius = argv[3]
            right_eye_radius = argv[4]

    left_eye = Eye.Eye(left_eye_radius)
    right_eye = Eye.Eye(right_eye_radius)
    left_eye_abnormal = Eye.Eye(0)
    right_eye_abnormal = Eye.Eye(0)
    mouth_height_width = Mouth.Mouth(0, 0)

    normalhead = Head.Head(noofhair, radiusofhead, left_eye, right_eye,
                           mouth_height_width)
    print("Normal Head:" + "\n")
    print(normalhead.toString() + "\n")
    abnormalhead = Head.Head(noofhair, radiusofhead, left_eye_abnormal,
                             right_eye_abnormal, mouth_height_width)
    print("Abnormal Head:" + "\n")
    print(abnormalhead.toString())

    normalhead = Head.Head(noofhair, radiusofhead, left_eye_abnormal,
                           right_eye_abnormal, mouth_height_width)
    # Mouth.Mouth.setHeight(1)
    print("\n")
    print("After Closing Eyes and Mouth for Normal Head" + "\n")
    print(normalhead.toString() + "\n")
    normalhead.headAche()
Example #3
0
# AlienTest.py
from Alien import *
from Eye import *
from Nose import *
from Mouth import *
from Head import *
import sys, getopt

if __name__ == '__main__':

    eyeLeft1 = Eye(2)
    eyeRight1 = Eye(2)
    nose = Nose(3, 3, 2)
    mouth = Mouth(5, 2)

    eyeLeft2 = Eye(2)
    eyeRight2 = Eye(3)
    normalHead = Head(100, 4, eyeLeft1, eyeRight1, nose, mouth)
    abnormalHead = Head(100, 4, eyeLeft2, eyeRight2, nose, mouth)

    print("Normal Head", normalHead.toString())
    print("\n\nAbnormal Head", abnormalHead.toString())

    normalHead.getLeft().close()
    normalHead.getRight().close()
    normalHead.getMouth().close()

    if normalHead.headAche():
        print("\nHead Ache")
    else:
        print("\nNo Head Ache")
Example #4
0
import Hand
import Head
import movement
import RPi.GPIO as GPIO

GPIO.cleanup()  # reset GPIO

LeftHand = Hand.Hand(3, 5, 7, 8, 10)
RightHand = Hand.Hand(11, 13, 15, 12, 16)
BigHead = Head.Head(19, 21, 23, 22, 24)
movesystem = movement.movement(22, 24, 36, 35)
Example #5
0
 def __init__(self):
     self.body = deque([])
     self.head = Head.Head(self.starting_pos, (0, 0))