Mousetrap test in python

Mousetrap test

Mousetrap which simply means to trap a mouse which is inside our house. You know that what kind of trouble does the mouse makes. I literally don’t want them in my house because they make a hole in my clothes.
Anyway, you know that I am not talking about the real mousetrap. Since this is a programming mouse trap which we are doing it in python seems cool though. Maybe this is the only one project of mouse trap in python. Who else do this kind of things?

What do you need to run the program?
  • Python of any version
  • You should install libraries like state, string, stateMachine, and mouseAction

As you can see that I have run this program in the terminal and this is all about the cheese. While mouse chase for cheese, he/she will have the same smell and then fall for it and get trapped.
You can see that how cool this game is. Like you can see from below output

Waiting: Broadcasting cheese smell
mouse appears
Luring: Presenting Cheese, door open
mouse runs away
Waiting: Broadcasting cheese smell
mouse appears
Luring: Presenting Cheese, door open
mouse enters trap
Trapping: Closing door
mouse escapes
Waiting: Broadcasting cheese smell
mouse appears
Luring: Presenting Cheese, door open
mouse enters trap
Trapping: Closing door
mouse trapped
Holding: Mouse caught
mouse removed
Waiting: Broadcasting cheese smell
mouse appears
Luring: Presenting Cheese, door open
mouse runs away

I have made this program in so simple way that you can only run the program and then it will generate the output.
And finally, click on below button to download this project.
Download
Thank you,

0 0 vote
Article Rating

You may also like...

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x