Skip to content
/ RhChess Public

It takes a certain format of a Chess board and returns all possible moves.

License

Notifications You must be signed in to change notification settings

RHL120/RhChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RhChess

A small haskell tool to list the possible moves of a chess variant. The charecter w reprents a white piece and the charecter b represents a black piece.

Piece charecters

  • r: rook
  • n: knight
  • b: bishop
  • q: queen
  • k: king
  • e: empty

Board format

The board is divided into rows an columns. Rows are spereated by newlines, columns are seperated by spaces. Each column contains 2 charecters (cp with c being the color and p being the piece type), each row contains 8 columns and the board contains 8 rows. Empty columns are represented by ee.

Example

this variation

br bn bb bq bk bb bn br
bp bp bp ee bp bp bp bp
ee ee ee ee ee ee ee ee
ee ee ee ee ee ee ee ee
ee ee bp wp ee ee ee ee
ee ee ee ee wp ee ee ee
wp wp ee ee ee wp wp wp
wr wn wb wq wk wb wn wr

gives out this image

Alt text

What it does not check for

It does not check whether or not a move causes a check (whether or not the move is legal). It does not give a castle move. The reason why is because in order for it to check whether or not you are able to castle it should have to record of moves (to see if the king and/or rook have moved) for that same reason it can't check for En passant.

About

It takes a certain format of a Chess board and returns all possible moves.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published