31 lines
792 B
Python
31 lines
792 B
Python
from Modele.Robot import Robot
|
|
from Modele.RobotMobile import RobotMobile
|
|
from Modele.Aspirateur import Aspirateur, AspirateurRobot
|
|
|
|
def test_robot():
|
|
print("=== Test Robot ===")
|
|
r = Robot()
|
|
print(r)
|
|
r.tourner(1)
|
|
print("Après rotation :", r)
|
|
|
|
def test_robot_mobile():
|
|
print("\n=== Test RobotMobile ===")
|
|
rm = RobotMobile(robot_type="Mobile")
|
|
print(rm)
|
|
rm.avancer(5)
|
|
print("Après avancée de 5 :", rm)
|
|
|
|
def test_aspirateur_robot():
|
|
print("\n=== Test AspirateurRobot ===")
|
|
ar = AspirateurRobot(marque="Dyson", puissance=7500, distance_max=100)
|
|
print(ar)
|
|
ar.avancer(10)
|
|
ar.tourner(-1)
|
|
print("Après déplacement et rotation :", ar)
|
|
|
|
if __name__ == "__main__":
|
|
test_robot()
|
|
test_robot_mobile()
|
|
test_aspirateur_robot()
|