Code Monkey home page Code Monkey logo

connect4's Introduction

connect4

A connect 4 game with game rules explained in details here: https://www.ludoteka.com/clasika/connect-4.html

How to run the game

Download Connect4

Clone this project to create a local copy on your computer.

Run the game

Navigate to the directory of this project on your terminal. Run __main__.py <player_type> <player_type> to start the game. <player_type> allows you choose a type of player to play with. Note that you have to enter the path to the player python file. There are three types of players that you can choose from. Input players/humanPlayer.py to select a human player which enables you to choose the moves, players/randomPlayer.py to select a random player who choose moves randomly, and players/valeriePlayer.py, players/korkorPlayers/minimaxPlayer.py, or players/korkorPlayers/smartMinimaxPlayer.py to select an AI bot that uses minimax algorithm to choose the moves.

Note that the order at which you input <player_type> determines the order at which the players will play by.

You can also run __main__.py -h for help.

How to select moves during the game (if you are using humanPlayer.py as a player)

The board has coordinates 0 to 6 (x-axis). Choose one to select the column.

connect4's People

Contributors

valyippee avatar xiumengg 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.