GithubHelp home page GithubHelp logo

timwoelfle / plainchess Goto Github PK

View Code? Open in Web Editor NEW
108.0 108.0 59.0 303 KB

PlainChess aims to be a simple yet full–featured and beautiful alternative to all the cluttered chess portals currently existing. Its primary goal is to allow two persons to play a round of chess, no matter whether they happen to be at the same location or on a different continent. It's designed to be platform independent and to run on every computer or smart phone running a modern web browser and thus enabling people everywhere around the globe to play chess, at home and on the go.

Home Page: http://plainchess.timwoelfle.de

License: GNU General Public License v3.0

JavaScript 69.09% PHP 2.51% CSS 15.32% HTML 13.07%

plainchess's People

Contributors

linutux avatar timwoelfle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plainchess's Issues

Exception when starting a new game

@timwoelfle

It appears that one of the three recent commits have broken the game. Getting the following exception when starting a new offline game:

game.min.js:37 Uncaught TypeError: h(...).updateReachables is not a function
    at HTMLDivElement.<anonymous> (game.min.js:37:183)
    at Function.each (jquery-3.6.0.min.js:2:3003)
    at S.fn.init.each (jquery-3.6.0.min.js:2:1481)
    at game.min.js:37:159
    at new Game (game.min.js:39:206)
    at Object.menuOption (game.min.js:52:202)
    at HTMLAnchorElement.<anonymous> (game.min.js:49:31)
    at HTMLAnchorElement.dispatch (jquery-3.6.0.min.js:2:43064)
    at HTMLAnchorElement.v.handle (jquery-3.6.0.min.js:2:41048)
(anonymous) @ game.min.js:37
each @ jquery-3.6.0.min.js:2
each @ jquery-3.6.0.min.js:2
(anonymous) @ game.min.js:37
Game @ game.min.js:39
menuOption @ game.min.js:52
(anonymous) @ game.min.js:49
dispatch @ jquery-3.6.0.min.js:2
v.handle @ jquery-3.6.0.min.js:2

Each click of "Play Offline" creates a new set of pieces:

plainchess

OS: macOS 12.3
Browser: Chrome Version 100.0.4896.127 (Official Build) (x86_64)

Bug: It is possible to put yourself into checkmate

This should be self explanatory

https://i.imgur.com/d8qbGLe.png

White moved the horse away from shielding the king from the opponent rook and thus put White into check. The game failed to prevent this move being made and did not show the 'check' flashing at any point. Black is unable to actually take the White King with its rook. Black then informs me they did actually move, trying to take the King with their rook and now sees this

http://i.imgur.com/QmUvGEt.png

My (White) view of the board remains the same and I cannot see the update, still seeing it as black's turn even after reloading the page in a new tab.

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

Your game done not work

so hjeres tej deal, i was trying teach my baby boy some chess but it did not work thanks!!!!

Bug Found - Double check problem

gameState

{"1":{"1":"","2":"","4":"","5":"","7":"","8":""},"2":{"1":"","2":"","4":"","5":"","6":"","7":"","8":""},"3":{"1":"","2":"","4":"","5":"","6":"","7":"","8":""},"4":{"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""},"5":{"1":"","2":"","3":"","4":"","5":"","7":"","8":""},"6":{"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""},"7":{"1":"","2":"","3":"","4":"","5":"","7":"","8":""},"8":{"1":"","2":"","4":"","5":"","7":"","8":""}}

moves

[{"startColumn":3,"startRow":2,"endColumn":3,"endRow":4,"pieceSymbol":"♙"},{"startColumn":4,"startRow":7,"endColumn":4,"endRow":6,"pieceSymbol":"♟"},{"startColumn":4,"startRow":2,"endColumn":4,"endRow":4,"pieceSymbol":"♙"},{"startColumn":4,"startRow":6,"endColumn":4,"endRow":5,"pieceSymbol":"♟"},{"startColumn":5,"startRow":2,"endColumn":5,"endRow":4,"pieceSymbol":"♙"},{"startColumn":3,"startRow":7,"endColumn":3,"endRow":5,"pieceSymbol":"♟"},{"startColumn":2,"startRow":2,"endColumn":2,"endRow":4,"pieceSymbol":"♙"},{"startColumn":2,"startRow":7,"endColumn":2,"endRow":5,"pieceSymbol":"♟"},{"startColumn":1,"startRow":2,"endColumn":1,"endRow":4,"pieceSymbol":"♙"},{"startColumn":1,"startRow":7,"endColumn":1,"endRow":5,"pieceSymbol":"♟"},{"startColumn":6,"startRow":2,"endColumn":6,"endRow":4,"pieceSymbol":"♙"},{"startColumn":5,"startRow":7,"endColumn":5,"endRow":5,"pieceSymbol":"♟"},{"startColumn":7,"startRow":2,"endColumn":7,"endRow":4,"pieceSymbol":"♙"},{"startColumn":6,"startRow":7,"endColumn":6,"endRow":5,"pieceSymbol":"♟"},{"startColumn":8,"startRow":2,"endColumn":8,"endRow":4,"pieceSymbol":"♙"},{"startColumn":7,"startRow":7,"endColumn":7,"endRow":5,"pieceSymbol":"♟"},{"startColumn":2,"startRow":1,"endColumn":4,"endRow":2,"pieceSymbol":"♘"},{"startColumn":8,"startRow":7,"endColumn":8,"endRow":5,"pieceSymbol":"♟"},{"startColumn":4,"startRow":2,"endColumn":2,"endRow":1,"pieceSymbol":"♘"},{"startColumn":4,"startRow":5,"endColumn":5,"endRow":4,"pieceSymbol":"♟","capturedPieceSymbol":"♙"},{"startColumn":4,"startRow":4,"endColumn":4,"endRow":5,"pieceSymbol":"♙"},{"startColumn":5,"startRow":5,"endColumn":6,"endRow":4,"pieceSymbol":"♟","capturedPieceSymbol":"♙"},{"startColumn":2,"startRow":4,"endColumn":3,"endRow":5,"pieceSymbol":"♙","capturedPieceSymbol":"♟"},{"startColumn":8,"startRow":5,"endColumn":7,"endRow":4,"pieceSymbol":"♟","capturedPieceSymbol":"♙"},{"startColumn":1,"startRow":4,"endColumn":2,"endRow":5,"pieceSymbol":"♙","capturedPieceSymbol":"♟"},{"startColumn":6,"startRow":4,"endColumn":6,"endRow":3,"pieceSymbol":"♟"},{"startColumn":3,"startRow":1,"endColumn":7,"endRow":5,"pieceSymbol":"♗","capturedPieceSymbol":"♟"},{"startColumn":7,"startRow":8,"endColumn":6,"endRow":6,"pieceSymbol":"♞"},{"startColumn":3,"startRow":5,"endColumn":3,"endRow":6,"pieceSymbol":"♙"},{"startColumn":6,"startRow":8,"endColumn":2,"endRow":4,"pieceSymbol":"♝","check":true},{"startColumn":5,"startRow":1,"endColumn":6,"endRow":2,"pieceSymbol":"♔"},{"startColumn":4,"startRow":8,"endColumn":2,"endRow":6,"pieceSymbol":"♛","check":true},{"startColumn":7,"startRow":5,"endColumn":5,"endRow":3,"pieceSymbol":"♗"},{"startColumn":7,"startRow":4,"endColumn":7,"endRow":3,"pieceSymbol":"♟","check":true},{"startColumn":6,"startRow":2,"endColumn":7,"endRow":3,"pieceSymbol":"♔","capturedPieceSymbol":"♟"},{"startColumn":2,"startRow":6,"endColumn":5,"endRow":3,"pieceSymbol":"♛","capturedPieceSymbol":"♗"},{"startColumn":7,"startRow":1,"endColumn":6,"endRow":3,"pieceSymbol":"♘","capturedPieceSymbol":"♟"},{"startColumn":6,"startRow":5,"endColumn":6,"endRow":4,"pieceSymbol":"♟","check":true},{"startColumn":7,"startRow":3,"endColumn":7,"endRow":2,"pieceSymbol":"♔"},{"startColumn":8,"startRow":8,"endColumn":7,"endRow":8,"pieceSymbol":"♜","check":true},{"startColumn":6,"startRow":3,"endColumn":7,"endRow":5,"pieceSymbol":"♘"},{"startColumn":6,"startRow":4,"endColumn":6,"endRow":3,"pieceSymbol":"♟","check":true},{"startColumn":7,"startRow":2,"endColumn":7,"endRow":3,"pieceSymbol":"♔"},{"startColumn":6,"startRow":3,"endColumn":6,"endRow":2,"pieceSymbol":"♟","check":true},{"startColumn":4,"startRow":1,"endColumn":6,"endRow":3,"pieceSymbol":"♕"},{"startColumn":6,"startRow":6,"endColumn":4,"endRow":7,"pieceSymbol":"♞"},{"startColumn":6,"startRow":1,"endColumn":4,"endRow":3,"pieceSymbol":"♗"},{"startColumn":5,"startRow":3,"endColumn":5,"endRow":1,"pieceSymbol":"♛"},{"startColumn":6,"startRow":3,"endColumn":4,"endRow":1,"pieceSymbol":"♕"},{"startColumn":4,"startRow":7,"endColumn":6,"endRow":6,"pieceSymbol":"♞"},{"startColumn":4,"startRow":3,"endColumn":6,"endRow":1,"pieceSymbol":"♗"},{"startColumn":5,"startRow":1,"endColumn":5,"endRow":3,"pieceSymbol":"♛","check":true},{"startColumn":7,"startRow":5,"endColumn":6,"endRow":3,"pieceSymbol":"♘"},{"startColumn":5,"startRow":3,"endColumn":6,"endRow":4,"pieceSymbol":"♛","check":true},{"startColumn":7,"startRow":3,"endColumn":8,"endRow":2,"pieceSymbol":"♔"}]

castlingAllowed

{"white":{"queenSide":false,"kingSide":false},"black":{"queenSide":true,"kingSide":false}}

gameTime
724

whitesTurn
0

Selection_20210212_0003

Castling broke the game

Castling the king with the rook made the opponent's queen take the rook. The game doesn't function after this move because the player can no longer move. In the attached image you can see that the queen is in an impossible position in the right bottom corner of the board.

Chessglitch

Bug Found - Disappearing Piece

About half way through a game (in which I was winning ;) one of my pieces disappeared off the board when I clicked on it to make a move. I could see the piece on the right hand side and it was sort of greyed out.

The piece never came back but I could continue with my move using a different piece.

I have no idea what happened.

Bug Found - Could not move rook into a check position

In the same game where one of my pieces disappeared off the board (created a separate issue for this), I could not move my rook to the right to put my opponent into check. The same thing happened when I had the option for check-mate.

I could move the rook up and left, but not right or down.

Thank you for the chess!

missing games folder

Your code requires a games folder be created and writeable. You should include this with your code here, or at least create a readme file explaining such.

Bug when there are 2 checks going on at the same time

I was playing a game with my friend yesterday and noticed that in this position that we had (check the video attached), I was allowed to move my (white) knight on e2 to g1 to block the check from the black Queen on h1, but that's an illegal move because the white knight was pinned by the black Bishop on f3 to the white King, so I shouldn't have been allowed to move it. Therefore, I propose that some changes are made to this game so that this doesn't happen.

Let me know if this makes sense.

Thanks!

PlainChess.Bug.mp4

strange error when I am winning xD

Screenshot from 2020-01-05 15-16-36

White king was on C2 after white move and was teleported to C6.

1000game.min.js:24 Uncaught TypeError: Cannot read property 'column' of undefined
at z.move (game.min.js:24)
at HTMLDivElement. (game.min.js:26)
at HTMLDivElement.e.complete (jquery-1.4.4.min.js:151)
at fx.step (jquery-1.4.4.min.js:155)
at Array.e (jquery-1.4.4.min.js:152)
at tick (jquery-1.4.4.min.js:156)
2027game.min.js:24 Uncaught TypeError: Cannot read property 'column' of undefined
at z.move (game.min.js:24)
at HTMLDivElement. (game.min.js:26)
at HTMLDivElement.e.complete (jquery-1.4.4.min.js:151)
at fx.step (jquery-1.4.4.min.js:155)
at Array.e (jquery-1.4.4.min.js:152)
at tick (jquery-1.4.4.min.js:156)

and number of messages increases...

Bug with timeout

First of all - awesome game. This is exactly what me and my friends were hunting for. We play it for like 3 hours a day in class. It's great.

Oftentimes once the game has been in play for >10 minutes, it shuts off. On both players screens it says 'Opponent's turn'. I know you've made the game using sockets - but is there something wrong? Could it be our WiFi?

Refreshing doesn't work.

Upgradation

Hello,

        Application was awesome !! Can we make this finding host automatic system.

Castle

I tried moving the king and tried moving the rook to castle, but nothing happens. Does the game's code allow for it?

Managed to capture opponents king

King was on the 1st rank. King was threatened by a check by a rook. White moved knight to stop the check which was an illegal move as the knight already guarded the king from check by bishop. After the illegal knight move bishop captured the king to try whether it works and indeed it did.

Move validation on server side

It is incredibly easy as is to falsify moves and move your pieces anywhere on the board.

Example:
startColumn=5&startRow=8&endColumn=1&endRow=1

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.