Giter Site home page Giter Site logo

chess's Introduction

Chess

ezgif com-gif-maker

Files :

  1. ChessMain.py: Contains the code to handle user input and draw the game visuals
  2. ChessEngine.py : Contains the logic of the Chess game (Using Brute Force Algorithm for calculating valid moves)
  3. ChessEngineAd.py : Contains the logic of the Chess game (Using Optimised Algorithm for calculating valid moves)
  4. ChessBot.py : Contains the logic for the BOT to play smartly considering captures, defences and positional advantages to some extent.

###Library to be installed for this Chess engine to work :

  • pyGame: pip3 install pygame

To play the game using optimised algorithm run the following command in the terminal :

python3 ChessMain.py adv or python ChessMain.py adv

To play the game using brute force algorithm run the following command in the terminal :

python3 ChessMain.py or python ChessMain.py


To choose whether to play a 2 player game or vs Computer or just see Computer Playing against itself make the following changes in the Config File:

  • For Playing as White (Default)                        : Set PLAYER_ONE_HUMAN = True and PLAYER_TWO_HUMAN = False

  • For Playing as Black                                        : Set PLAYER_TWO_HUMAN = True and PLAYER_ONE_HUMAN = False

  • For 2 Player Game                                          : Set both PLAYER_ONE_HUMAN and PLAYER_TWO_HUMAN = True

  • For seeing Computer play from both sides   : Set both PLAYER_ONE_HUMAN and PLAYER_TWO_HUMAN = False

chess's People

Contributors

monil-bansal 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.