Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ehulinsky/AnalogChess

Chess but no grid
https://github.com/ehulinsky/AnalogChess

Last synced: about 1 month ago
JSON representation

Chess but no grid

Awesome Lists containing this project

README

        

# Analog Chess


This is a version of chess where the pieces are not constrained to an 8x8 grid, and instead can move to any position on the board.
After clicking on a piece, the areas it may move to are highlighted in green, and areas the enemy can move to are highlighted in red. Drag the piece to move it, and to confirm a move, either click on the piece again or press enter. To cancel a move, press escape or click anywhere off the piece.



There is no check or checkmate in this game. __To win, you simply need to capture the opponent's king__. This is mainly because stalemate is basically impossible, as the king can always move an infintesimal amount, and also because implementing check/checkmate would destroy the last ounce of sanity I have left.

## Pieces

Each piece's moves are based on it's moves in regular chess, but in Analog Chess, pieces may move to any position along their trajectory.

__Pawn:__ May move 0-2 squares on it's first move, 0-1 otherwise. Can only attack diagonally. Sadly en passant (the funny move) is not implemented yet because I have no idea how it would work.



__Bishop:__ Moves any distance diagonally



__Knight:__ Moves in a circle of radius sqrt(5), which is the distance it travels in it's usual L move.



__Rook:__ Moves any distance orthogonally



__Queen:__ Moves any distance orthogonally or diagonally.



__King:__ Moves 0-1 squares orthogonally or 0-sqrt(2) squares diagonally. It is allowed to move into check because this game was way too complicated to code already. You lose if your king dies.



The king may castle with the rooks, and it is allowed to castle out of, into, or through check.




## Capturing
Capturing in this game is more powerful than in normal chess. Basically, if your piece overlaps the opponent's piece it is captured, but you cannot move past the first piece you overlap.

__Example__

One interesting side effect of this is that you can capture multiple pieces at once. :)



## Code
To run the code you will need to install Python and the PyGame library, and then run the latest .py file.