Python Mouse Trap with Source Code
Python Mouse Trap is a simple program which attracts a mouse with a cheese and then traps it in a cage. This project helps any user to play a game of mouse trap. Also, project is very simple and attractive with a language preference as python and library as sys, statemachine and many more.
Python Mouse Trap helps any user to build a game and a concept of catching a mouse. Similarly, classes has been made for better defining and making call in the function. So, waiting, luring, holding, trapping and mouseTrap classes are made. All of these classes and functions are handled by mouseAction library.
- Python as a programming language.
- Tkinter as a library for GUI based application.
- Pycharm as an IDE.
- pmw as a library.
- Use of both mouse and keyboard to input numbers
- Simple library with user understandable code.
- Simple and easily understandable.
- User-friendly game.
- Command line game with one time run-able program.
- Ease of use.
- A simple function starts with opening and closing of mouse trap.
- A loop function has been used for catching and removing a mouse.
- Also, a loop of cheese presenting and broad casting is done.
- Similarly, a function calls for a mouse and attracts it with a cheese and catch it.
Therefore things to know
- You have to download python 2 or python 3 (sudo apt-get install python3).
- So, you have to install pip or pip3 for downloading different libraries (sudo apt-get install python-pip).
- Also, you can install Tkinter library with sudo pip install tkinter.
- Likewise, you can install pycharm or Atom or Sublime text for an IDE or you can simply ~ sudo nano filename.
- You have to install statemachine library with sudo pip install statemachine.
Therefore click on below button to download this project