One of the most interesting things in this project is the MoverTimer - JavaScript object (prototype function) that allows you to simultaneously animate many images (pieces on the chess board). It is quite another story, the story that can arouse some inspiration. Yes, I know that this problem is solved, now anyone can play chess through the web, but using your own code (for the purpose of smoothly animating chess pieces) makes a difference. I plan to use this code in application that allows to play chess with my friends by the net. You also may add some of your favourite chess games texts to the existing list and use this application to spend a good time. You may use the script of this project to develop a web application that takes PGN-text from the user and gives him a possibility to watch the animation of any chess game, navigate through the moves, analyze the game and learn to play chess (the best game to develop one's mind). I risk to make a mistake, but it seems as if they all were created by hand (huge efforts!). The best PGN-viewer I know ( ), uses predefined FEN strings for all the moves. The last feature is called pawn promotion. You must consider: irregularity (pawn on e2 may go to e3 or e4, but after that it may advance only by one square), en passant capture and possibility to transform to any piece (rank) on the last row. The greatest troubles are brought by the pawns' moves. The problem does not seem very hard, but if you take into account that a move may have different formats depending on the current situation ( Nc3, Nec3, N2c3, Nxc3, Nexc3, N2xc3, Nc3+, Nec3+, N2c3+, Nxc3+, Nexc3+, N2xc3+), then you would realize that there is something to do here. For instance, suppose that previous FEN-like string is: I mused the problem for several years and only now (in Christmas holidays), I found some time to implement the algorithm of calculating a FEN-like string (describing a chess position after a current move) out of the previous FEN string and current move notation.įEN - Forsyth–Edwards Notation ( FEN). When I realized the power of JavaScript and necessity to use it in modern web applications, I selected the problem of PGN-Viewer as a starting point. To test this assertion, one may try to develop some "useful" application. They say that JavaScript supports object oriented style. This style of programming looks awkward and does not arouse inspiration. But examples I stumbled upon were written using document.write("Some HTML") operators. There are many chess PGN-viewers written in different languages and JavaScript is among them. Portable Game Notation (PGN) is used to record chess games' moves and comments (e.g., 1. One might argue the assertion, but I believe that any software developer must like chess. ![]() I am sorry, but that was an old, buggy version. ![]() ![]() ![]() Please, download this (corrected) version of ChessViewer if you have downloaded it earlier (January 4). Download ChessViewer_HTML_and_Script_ - 510.5 KB.I haven't gotten to this tactics book yet - I'm doing Dan Heisman's Back to Basics: Tactics first, but before I do Seirawan's book I'll probably load each of the individual pgns within the pgn file into a viewer like the freebie Lucas Chess (Tools/PGN Viewer/Read PGN) or Chess King, and simultaneous open the file with Notepad. 31 is for diagram 24, and there are pgn files within the file for each of the end-of-chapter test problems. There are no titles to each diagram/notation sequence. You could open the file in Notepad (on Windows) and strip out the FEN's for each problem.īut the file is poorly put together. I say that because I don't about FEN's alone, but the pgns for Seirawans books exist, including Winning Chess Tactics, here: Whether on a real board or a screen is up to you. I agree with 2Q1C about working the problems first although the 2nd half of the book is example games where a pgn file is very handy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |