Connect dots game in python

Connect dots game in python

Introduction

Connect dots game is a multi-player puzzle game made in python. The objective of this game is to connect four dots and win.

Connect dots game is created using python programming language. In this project, we are creating a connect four game using command line interface. We are not using a graphical user interface. The game has a 6×7 board made with zeros that you see when you execute the project. You must enter either 1 or 2 in your turn. It is a multiplayer game played between two players.

The player must make a connection of the same number four times horizontally, vertically, diagonally will win. You must use numbers from your keyboard to plot inside the box. As you enter the number the zero will be replaced by the number you entered. The first player to make four dots will win. Remember, you can only use 1 and 2. You will see a message as player1 or player2 wins. See the screenshot below.

connect dots

Building the connect dots project

Python programming is used in building this project. We must import numpy library as np. We are creating a board of 6×7. This connects four game is played within the board. All you have to do is made 4 pairs of dots horizontally, vertically, diagonally. The first player to connect four dots will win. The project is simple and easy to understand.

We are not using GUI. It is a command line game. We are creating functions and calling them to the specific area. We are using control statements, def functions, while loops, etc for making our project work. It is an intermediate-level project. Download the source code and get experienced by yourself. Follow the guidelines below.


How to use this project?

  • Download the project and extract the folder.
  • Open the project folder in editor or IDE. (pycharm, anaconda
  • Execute the project.
  • Play the connect dots game.
  • Enjoy and share

Click the button below to get the source code for this connect dots project.