enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. c++ - Parsing a Chess FEN - Code Review Stack Exchange

    codereview.stackexchange.com/questions/251795

    The size will be equal to the number of square in a chess board (64). Assume we are parsing to this array. char board[64]; We can assume this board to be The numbers on the squares are just the indexes. A chess FEN starts the square A8 and ends in the square H8, this is perfect because those are the start and end indexes of our array.

  3. performance - Chess position representation with FEN parser -...

    codereview.stackexchange.com/questions/282023/chess...

    Also, since this is part of a chess engine, the position representation must be small for cache performance, and the operations like moving pieces, getting castling rights, etc, must be fast because the position is modified in a recursive function that searches for the best next move. Here's the code for pos.c:

  4. performance - Chess engine for chess without checks in C++ - Code...

    codereview.stackexchange.com/questions/259202

    This engine implementation is for chess without checks. Since checks don't exist, expect the code to not account for pinned pieces. Kings can move to dangerous squares (and be captured next turn). Castling is not implemented yet. The project is comprised of 3 .cpp and 3 .h files, and main.cpp.

  5. Decode FEN string into separate variables for the 6 categories

    codereview.stackexchange.com/questions/247415

    The decodeFen code is a "stream-of-conciousness" code that is hard to read and prove correct. The code is missing fundamental concepts like functions to encapsulate complexity and implementation details. For example, organize decodeFen as a series of calls to parse functions for each FEN field. As an example, consider the FEN piece placement field.

  6. Generating and printing chess board in Rust

    codereview.stackexchange.com/questions/187810/generating...

    Stack Exchange Network. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

  7. javascript - PHP Chess Version 2 - Code Review Stack Exchange

    codereview.stackexchange.com/questions/203324/php-chess...

    For programming practice, I created a chess program in PHP (my most comfortable language). The program reads a FEN (a string with the location of all the pieces on the board) from the URL, generat...

  8. Generating possible Chess moves - Code Review Stack Exchange

    codereview.stackexchange.com/questions/53875

    You could then use this information to avoid recomputing possible moves for pieces where nothing has changed. Basically, a pieces possible moves only change when (1) it moves, (2) a blocking piece moves, (3) a same-colored piece moves into blocking position. public Collection<Square> generatePossibleMoves() {.

  9. Chess game in Python - follow-up - Code Review Stack Exchange

    codereview.stackexchange.com/questions/104467/chess-game...

    Three weeks ago I wrote the first version of my chess game in Python and shared on Code Review. Thanks to your suggestions, I improved my code. I would like to know if I am going in good direction with all this stuff. def range(x,y): return x > 8 and y > 8. def if_figure(board,x,y): return board[x][y].sl == '.'.

  10. beginner - Chess game in C - Code Review Stack Exchange

    codereview.stackexchange.com/questions/234619/chess-game-in-c

    7. I've never programmed in C before, but decided I wanted to try making Chess. Currently there's no way to check whether the game has ended. Was looking for critique for future projects. #include <stdio.h>. #include <math.h>. #include <stdlib.h>. // 1 pawn 2 rock 3 bishop 4 knight 5 queen 6 king. int currentTurn = 1;

  11. Chess Game with GUI in C++ using SDL2 - Code Review Stack...

    codereview.stackexchange.com/questions/282734/chess-game...

    So, I recently completed a chess game with a GUI in Python, using Pygame. Upon research, I learned that Pygame is built on SDL, and since I wanted to practice C++ more, I decided to code chess again in C++. I have 5 source files and 6 header files. Since this is a large project, feel free only to review the code design/style or just one file.