# sprite = codesters.Circle(x, y, diameter, "color")
sun = codesters.Circle(-150, 175, 75, "gold")
# sprite = codesters.Square(x, y, width, "color")
house = codesters.Square(0, -125, 250, "purple")
# sprite = codesters.Triangle(x, y, size, "color")
roof = codesters.Triangle(0, 100, 300, "green")
# sprite = codesters.Rectangle(x, y, width, height, "color")
door = codesters.Rectangle(0, -175, 75, 150, "blue")
t = codesters.Teacher()
sprites = t.find_function('Sprite')
try:
tval1 = stage.get_background()
except:
tval1 = "DNE"
try:
tval2 = roof.get_color()
tval3 = door.get_color()
tval4 = house.get_color()
tval5 = sun.get_color()
tval6 = [tval2, tval3 ,tval4, tval5]
except:
tval2 = "DNE"
tval3 = "DNE"
tval4 = "DNE"
tval5 = "DNE"
tval6 = "DNE"
try:
tval7 = len(sprites)
tval8 = sprites[0][1]
except:
tval7 = "DNE"
tval8 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 != None, "Great job!")
t1.add_failure(tval1 == None, "Did you add a background to meet Requirement #1?")
t2 = TestObjective()
t2.add_success(tval6 != ['green', 'blue', 'purple', 'yellow'], "Great job!")
t2.add_failure(tval6 == ['green', 'blue', 'purple', 'yellow'], "Did you change the colors of any part of your house?")
t3 = TestObjective()
t3.add_success(tval7 > 0 and 'sprite' not in tval8, "Great job!")
t3.add_failure(tval7 == 0, "Did you add a person or animal sprite?")
t3.add_failure('sprite' in tval8, "Did you change the name of your new sprite?")
tester = TestManager()
tester.add_test_list([t1, t2, t3])
tester.run_tests()
tester.display_first_feedback()