Giter Site home page Giter Site logo

lorddarkula / chess_py Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 5.0 3.12 MB

Chess library for simple chess engine creation

Home Page: http://lorddarkula.github.io/chess_py/

License: MIT License

Python 100.00%
chess-engine player game chess-game chess-board python python3 python-2 python-library

chess_py's People

Contributors

rk900 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chess_py's Issues

Fix enter key crash

When no move is provided and the enter key is hit instead, the program crashes.

Rewrite Converter

Refactor code into variables, methods, and classes

class Converter:
    def short_alg():
        king_side = ....
        .......... 


}

Fix import statements

Extremely complicated set of imports in init.py. Decide if internal directories need to be packages.

Rename methods in converter.py

These 3 should be the only publicly accessible methods

  • long_alg
  • short_alg
  • make_legal

Renaming to_move to _to_move would probably be the easiest way to do this

Revamp Color

get rid of constants outside the class (white and black), and replace with Color.White and Color.Black.

Update docstrings

In order to work correctly with sphinx, docstrings must look like this . . .

def my(a, b):
"""
my does some shit

:type a: str
:type b: str
:rtype: str
"""
return a + b

Fix castling exception

When castling, the Location of the King somehow ends up as empty when testing checks in King.

test = copy.deepcopy(position)
# Somehow the Location of the King is empty 

test_move = Move(end_loc=move.end_loc,
                 piece=test.piece_at_square(self.location), # Problem right here
                 status=move.status,
                 start_rank=self.location.rank,
                 start_file=self.location.file)

test.update(test_move)
test_king = test.piece_at_square(test_move.end_loc)

Remove unfiltered

Certain methods that return a list of moves first generate a raw list then filter it. This is inefficient.

Update README

Update README to reflect changes in v2.0, and point to the sphinx docs.

Rewrite Board

With the following goals

  • more efficient
  • reflect changes in the architecture

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.