Stack Exchange Network

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

Visit Stack Exchange

Questions tagged [chess]

This tag is for concepts involving the game of Chess.

4
votes
1answer
678 views

Recursive Breadth First Search for Knights Tour

This was written as an experiment in performance, based on another question here on CodeReview. Input into the algorithm is the number of squares on one edge of the chess board, the point of origin, ...
14
votes
3answers
2k views

N-Queens - Brute force - bit by bit

A discussion in The 2nd Monitor made me realize I had never 'solved' the N-Queens problem. Additionally, as I read up on it, I realized that the 64-squares in a chess board would work well if ...
8
votes
2answers
114 views

Game of Runes: revised version

I have created a game called Runes in C. It is similar to Chess, but has a bigger board and different pieces. I would like to know how I can improve the code, for example, with user interface ...
14
votes
4answers
43k views

Chess game in Python

I have programmed for 2 months, and I began writing a Chess game. I am a beginner programmer in Python, so please assess my code. ...
15
votes
2answers
14k views

Simple Chess Game, Part 1: The Board

I am currently creating a chess game, and have so far done the board. The board is pretty much a two-dimensional array, where Pieces are stored in their positions. ...
7
votes
3answers
268 views

Unicode Chess PvP with Move Validation

Main Purpose This script allows two players to play chess on a virtual chessboard printed on the screen by making use of the Unicode chess characters. Visual appearence ...
2
votes
2answers
511 views

HackerRank - Queens Attack II - Java

The problem definition can already be found here. Given a chess board with dimensions n × n (where n is up to 100000) and the (r, c) positions of various obstacles, how many squares can a queen at a ...
12
votes
1answer
2k views

Hackerrank Queen's Attack II

Problem statement A queen is standing on an \$n\$x\$n\$ chessboard. The chessboard's rows are numbered from \$1\$ to \$n\$, going from bottom to top; its columns are numbered from \$1\$ to \$n\$, ...
6
votes
3answers
346 views

Chess puzzle improvement

Is it possible to optimize this solution to the N-queens puzzle? ...
5
votes
2answers
2k views

Finding all legal bishop moves

I am trying to create a two player Chess game. To do this I want to generate a list of legal moves. I am having trouble with the brevity of the code to generate the moves for the rooks and bishops. ...
3
votes
1answer
110 views

Class modelling for a shogi notation reader

I have made GPL software in GitHub whose purpose is reading shogi notations (shogi is Japanese chess). I have been told that my software modelling is underdeveloped in this question and advised to ...
2
votes
1answer
2k views

Calculating all possible Knight turns (Chess)

I'm creating a console application that takes as input starting column and starting row, also the ending column and the ending row and it's going to output all the possible way's to get to that point ...
11
votes
2answers
549 views

N-Queens functional

I'm trying to get a better grip on the new functional possibilities of Java 8. As an example, I took this very elegant Haskell snippet: ...
10
votes
3answers
851 views

First Chess project

I'd made a project using pygame in python around 3 months ago. This was my first big project after I started learning how to program in college. Now I'd like to know just how good my programming ...
10
votes
1answer
129 views

Game of Runes: a similar concept to chess

I have created a game called 'runes' in C. It is similar to Chess, but has a bigger board and different pieces. I would like to know how I can improve the code, for example, by adding proper error ...
7
votes
2answers
8k views

Chess game in Windows Forms Part #1

I've recently created my own 2-player chess game, no AI... at least for now. I do plan to do that in the future, so one of my concerns is if the code is flexible enough to just use the same classes ...
7
votes
4answers
5k views

Enumerating moves for a chess piece

I'm just at the beginning stages of making a simple chess engine. I have a function that when passed the x and y coordinates on a 2D list can enumerate all possible moves for a piece. It assumes there ...
6
votes
3answers
1k views

Optimizing this Knight's Tour

My assignment in CS was to make a knight's tour application that could solve the problem from any starting position. I had just finished the code so excuse the lack of deeply descriptive comments. My ...
5
votes
2answers
2k views

Knight's Tour with Heuristics

When someone suggested that I solve Knight's Tour, I did so with heuristics and recursion. It takes a lot of time to solve even a 8x8 board: N-A1 N-C2 N-E1 ... N-E6 N-F4 Time used ...
3
votes
1answer
949 views

Chess game in Windows Forms Part #2

(Part 1 here) I've recently created my own 2-player chess game, no AI... at least for now. I do plan to do that in the future, so one of my concerns is if the code is flexible enough to just use ...
2
votes
1answer
1k views

Display all solutions for NQueens

In my previous NQueens Code Review question, I received feedback saying that I should write a program that would find all solutions. This revised program should be more general than before. ...
1
vote
0answers
102 views

PHP Chess Part 1 - ASCII Board & Import Position

I have been really into chess lately so I decided to program the game in PHP for practice. I want to get more comfortable with classes. Part 1 of the project is complete. I have a working ASCII board ...