GithubHelp home page GithubHelp logo

yagoazedias / chess-board Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ahira-justice/chess-board

0.0 1.0 0.0 293 KB

A python chess board library for representing game positions

Home Page: https://pypi.org/project/chess-board

License: GNU General Public License v3.0

Python 100.00%

chess-board's Introduction

chess-board

What is chess-board?

chess-board is a Python chessboard package with a flexible "just a board" API for graphically representing game positions.

What chess-board is not

  • A chess engine
  • A legal move validator
  • A PGN parser

While chess-board is designed to work well with any of these, the idea behind chess-board is that the logic that controls the board should be independent of those other problems.

Usage

test.py - example

from chessboard import display

position = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2'

while True:
    display.start(position)

Entry Points

from chessboard import display

validfen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2'

# Initialization
display.start()

# Position change/update
display.update(validfen)

# Checking GUI window for QUIT event. (Esc or GUI CANCEL)
display.checkForQuit()

# Close window
display.terminate()

Installation

Download and install the latest release:

# install into virtualenv
pip install chess-board

or 

# install with pipenv
pipenv install chess-board

or

# install system-wide (windows), run cmd[powershell] as administrator
pip install chess-board

Alternatively, you could git clone this repo and add the directory to your package.

git clone https://github.com/ahira-justice/chess-board.git

Dependencies

pygame

chess-board installation automatically installs latest pygame version.

License

GNU GENERAL PUBLIC LICENSE

chess-board's People

Contributors

ahira-justice 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.