Skip to content

Connect 4 is a token game created with Python and module Numpy. Place 4 tokens in a row (vertically, horizontally, or diagonally) before your opponent wins. Single-player against Artificial Intelligence and multiplayer also available.

License

Notifications You must be signed in to change notification settings

MatthewTamYT/Connect-4

Repository files navigation

🔴🟡 Connect 4 🟡🔴

logo

GitHub code size in bytes GitHub GitHub followers

drawing

Stargazers repo roster for @MatthewTamYT/Connect-4

Forkers repo roster for @MatthewTamYT/Connect-4

Description

What does the application do?

The application is a Connect 4 with the purpose of creating 4 tokens in a row horizontally, vertically, or diagonally. You could do this by strategically placing tokens and blocking the other's attempts to win. Good luck!

What technologies did I use?

I used Python 3.9 because it is easy-to-use. It delivers my purpose through straight forward lines of code. I also used an IDE, PyCharm. This is because it has a great project management system and is friendly to beginners (like me)!

What challenges did I face?

I face many challenges. Because this is one of the rather complex piece of code I have written, I often confuse variables and loops. This caused many errors which I later fixed during the vigorous testing phase.

Table of Contents

  • Description
    • What does the application do?
    • What technologies did I use?
    • What challenges did I face?
  • Installation
    • Is there any installation process?
  • Using the project
    • How to use the project?
  • Contribution
    • How can you contribute to the project?
    • Are there any requirements for contributors?
    • What are the rules for contributing?
  • Project Features
    • What car brands are there?
    • Can you cheat?
  • To-Do List
  • Credits
    • Who helped?
    • What tutorials did I use?
  • Copyright License

Installation

Is there any installation process?

Honestly, it depends. There are three ways you can download the file.

  • The raw code: This enables you to see all the code. The downside is that you need a python interpreter for it to work. When you have your python interpreter installed, just copy the code and run the program.
  • Base Application: If you are sure you already have Python and PyGame installed, you can just download this base application. However, if you do not have both Python and PyGame installed, then you need:
  • Application with Python Files: You can download the application with all the necessary files. This means, even if your computer does not have Python or PyGame, you can just run through this simple installation process and still play the game. Besides, the file "car_brands.py" would already be implemented. (Installation only takes about 5 seconds, so this option is encouraged - 🌩️ speed)

Using the Project

How to use the project?

Again, it depends. If you chose the first option (raw code) from above, you would need a python interpreter, then just click on run. If you chose the second one , just click on the application and the game runs by itself. If you chose the last one, click on the application, allow it to make changes and all that faffle, then follow the instructions. It won't take you longer than 20 seconds to do the whole installation process.

Contribution

How can you contribute to the project?

Simple. Just email me. I will have a look at your profile page and send you an invitation link.

Are there any requirements for contributors?

No, of course not! Who would I be to judge whether you should be able to contribute to the project. Just politely email me and I would happily accept your help. I am determined to set everybody as equals to make this code as good as possible.

What are the rules for contributing?

Just don't mess around with the files. Remember that you may be held responsible for sabotage of any sort.

Project Features

What game modes are there?

You can play against Artificial Intelligence (and mind you, it's brutal), or you could choose to play it as a multiplayer game. Ask your friends to join you to play!

Can you cheat?

Prevention measures have been created to prevent user from inputting nonsense answers or repeating previous entries. Of course, you are free to edit the code after you downloaded another copy, where I cannot stop you from deleting the measures.

To-Do List

  • Thorough code testing. 💻
  • Refactor the code. 💾
  • Make the experience better. 📷
  • Improve appearance. 🌻

Credits

Who helped?

Huge thanks to Keith Galli for his idea. Check out his YouTube channel!

  • Matthew Tam
  • Walter Tam
  • Robert Brown

What tutorials did I use?

Copyright License

I am open to people copying my code and improving it. Just link me to the project.

However, please do not just take my code and claim it's yours.



I am looking forward to making this code work better. So please be comfortable to open issues or contact me: [email protected]

About

Connect 4 is a token game created with Python and module Numpy. Place 4 tokens in a row (vertically, horizontally, or diagonally) before your opponent wins. Single-player against Artificial Intelligence and multiplayer also available.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages