Giter VIP home page Giter VIP logo

football-game's Introduction

⚽ Football Manager Simulation Game ⚽

📋 Overview 📋

This is a simple Python-based simulation of a football (soccer) manager game. The focus is on simulating matches between two teams, where player skills, positions, and random events all contribute to the match outcome.

🌟 Key Features:

  • 👥 Simple player attributes for goalkeepers, forwards, midfielders, and defenders.
  • 🏟 Simulated match events including successful passes, shots, saves, and tackles.
  • 🌠 Inclusion of star players like Messi and Ronaldo with manually set high skill levels.
  • 🎲 Randomization for unpredictable outcomes.

💻 How to Run 💻

1️⃣ Clone this repository to your local machine.
2️⃣ Open a terminal and navigate to the project directory.
3️⃣ Run python main.py.

📚 Code Structure 📚

  • Player: A class to represent individual players. Each player has a name, position, and skill level.
  • Team: A class to represent a football team, consisting of different players in various positions.
  • battle: The main function that simulates the match between two teams.

🛠 Dependencies 🛠

  • Python 3.x

🎮 Examples 🎮

Match: Barcelona vs Juventus

Minute 1:
Messi from Barcelona shoots! 🥅
Ter Stegen from Barcelona makes a save! 🧤

... (snip) ...

Minute 90:
Ronaldo from Juventus shoots! 🥅
Goal!!! 🎉

Final Score: Barcelona 2 - 3 Juventus 🏆

🔧 Customization 🔧

You can modify player skills and team compositions to simulate different types of matches.

🤝 Contributing 🤝

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📄 License 📄

This project is licensed under the MIT License.

football-game's People

Contributors

hengzhe-zhang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.