Giter Site home page Giter Site logo

axenil-chess's Introduction

Build Status

axenil-chess

axenil-chess's People

Contributors

axelamit avatar leppan02 avatar m-blomqvist avatar

Watchers

 avatar  avatar

axenil-chess's Issues

Add function that checks if promotion is available before moving

When moving the pawn to the last rank you currently have to add the piece that it promotes to as input for the move. For example if you want to promote a pawn to a queen you have to call make_move(“c7 c8=q”). But if you call make_move(“c7 c8”) without =q you get invalid move as a response. It could therefore be convenient to add a function that checks whether a piece is a pawn or not and if so, check if it’s on the 7th or 1st rank.

Add win/Loss screen

As title indicates, a win/loss screen should pop-up in the case of a check-mate or tie and possibly direct the player to shut down the program or possibly (needing more effort) start a new game. This by adding an else clause in chess_controllers event to be run when self.game_over is true

Resize window according to board and UI size

Currently the application window is a fixed size disregarding the size of the contents giving black space which should not be shown unless it is used by UI-elements (such as a future turn indicator and such on the right hand side of the board).

This should be labeled an enhancement

Fix precision of mouse controls and piece-selection

Currently the mouse controls seem to be a bit imprecise, especially when not clicking at the centre of a piece's space. This is probably due to errors in the chess_controller event() function, either due to the mouse position being updated in an incorrect manner or due to rounding errors in the conversion from float mouse_pos values to u8 boardspace coordinates

Label this a bug

Moves resulting in checkmate are returned from get_moves

A move is shown as possible in the gui even if it results in checkmate. But when trying to make the move it’s not possible. This happens since the function get_moves() isn’t checking for checkmate. To fix this call check_if_legal_move() on each move in get_moves() before adding them to the vector.

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.