pychess.Variants package
Submodules
pychess.Variants.asean module
- class pychess.Variants.asean.AiWokBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- PROMOTIONS = (7,)
- PROMOTION_ZONE = ((40, 41, 42, 43, 44, 45, 46, 47), (16, 17, 18, 19, 20, 21, 22, 23))
- cecp_name = 'ai-wok'
- name = 'Ai-Wok'
- need_initial_board = True
- standard_rules = False
- variant = 34
- variant_group = 5
- class pychess.Variants.asean.AseanBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- cecp_name = 'asean'
- name = 'ASEAN'
- need_initial_board = True
- standard_rules = False
- variant = 30
- variant_group = 5
- class pychess.Variants.asean.CambodianBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- PROMOTIONS = (7,)
- PROMOTION_ZONE = ((40, 41, 42, 43, 44, 45, 46, 47), (16, 17, 18, 19, 20, 21, 22, 23))
- cecp_name = 'cambodian'
- name = 'Cambodian'
- need_initial_board = True
- standard_rules = False
- variant = 33
- variant_group = 5
- class pychess.Variants.asean.MakrukBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- PROMOTIONS = (7,)
- PROMOTION_ZONE = ((40, 41, 42, 43, 44, 45, 46, 47), (16, 17, 18, 19, 20, 21, 22, 23))
- cecp_name = 'makruk'
- name = 'Makruk'
- need_initial_board = True
- standard_rules = False
- variant = 31
- variant_group = 5
- class pychess.Variants.asean.SittuyinBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- PROMOTIONS = (7, 0)
- PROMOTION_ZONE = ((56, 49, 42, 35, 36, 45, 54, 63), (0, 9, 18, 27, 28, 21, 14, 7))
- cecp_name = 'sittuyin'
- name = 'Sittuyin'
- need_initial_board = True
- standard_rules = False
- variant = 32
- variant_group = 5
pychess.Variants.asymmetricrandom module
pychess.Variants.atomic module
- class pychess.Variants.atomic.AtomicBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- cecp_name = 'atomic'
- name = 'Atomic'
- need_initial_board = False
- standard_rules = False
- variant = 18
- variant_group = 4
- pychess.Variants.atomic.cordsAround(cord)
- pychess.Variants.atomic.kingExplode(board, move, color)
- pychess.Variants.atomic.piecesAround(board, cord)
pychess.Variants.blindfold module
- class pychess.Variants.blindfold.AllWhiteBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- cecp_name = 'normal'
- name = 'All white'
- need_initial_board = False
- standard_rules = True
- variant = 17
- variant_group = 0
- class pychess.Variants.blindfold.BlindfoldBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- cecp_name = 'normal'
- name = 'Blindfold'
- need_initial_board = False
- standard_rules = True
- variant = 14
- variant_group = 0
pychess.Variants.bughouse module
pychess.Variants.corner module
pychess.Variants.crazyhouse module
pychess.Variants.euroshogi module
- class pychess.Variants.euroshogi.EuroShogiBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- PROMOTION_ZONE = ((56, 57, 58, 59, 60, 61, 62, 63, 48, 49, 50, 51, 52, 53, 54, 55, 40, 41, 42, 43, 44, 45, 46, 47), (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))
- cecp_name = 'euroshogi'
- name = 'EuroShogi'
- need_initial_board = True
- standard_rules = False
- variant = 35
- variant_group = 4
pychess.Variants.fischerandom module
pychess.Variants.giveaway module
Giveaway Variant
- class pychess.Variants.giveaway.GiveawayBoard(setup=False, lboard=None)
Bases:
pychess.Variants.suicide.SuicideBoard
- Description
This is the international version of Losing chess used on ICC as Giveaway and on Lichess as Antichess
You must capture if you can, and the object is to lose all your pieces or to have no moves left. But in Giveaway, the king is just like any other piece. It can move into check and be captured, and you can even promote pawns to kings.
- cecp_name = 'giveaway'
- name = 'Giveaway'
- variant = 23
pychess.Variants.horde module
Horde Variant
- class pychess.Variants.horde.HordeBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Lichess horde: https://lichess.org/variant/horde
- FILES = 8
- HOLDING_FILES = ((11, 10, 9), (-6, -5, -4, -3, -2))
- cecp_name = 'horde'
- name = 'Horde'
- need_initial_board = True
- standard_rules = False
- variant = 28
- variant_group = 4
pychess.Variants.kingofthehill module
The King of the Hill Variation
- class pychess.Variants.kingofthehill.KingOfTheHillBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
The King of the hill variation is where the object of the game
is to try and manoeuvre to the centre of the board. The gmae is won when one player manages to get there king to any of the 4 centre square ie d4, d5, e4, e5
- cecp_name = 'kingofthehill'
- name = 'King of the hill'
- need_initial_board = False
- standard_rules = False
- variant = 26
- variant_group = 4
- pychess.Variants.kingofthehill.testKingInCenter(board)
Test for a winning position
pychess.Variants.knightodds module
Knightodds variant
- class pychess.Variants.knightodds.KnightOddsBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Knight Odds variant plays with the same rules as normal chess
but one side start the game with a knight missing
- cecp_name = 'normal'
- name = 'Knight odds'
- need_initial_board = True
- standard_rules = True
- variant = 11
- variant_group = 1
pychess.Variants.losers module
Losers Variant
- class pychess.Variants.losers.LosersBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
The Losers variant is a game where the concept is to get rid of all your
pieces before you opponent does. On a players turn if a piece can be taken it must be taken otherwise a normal chess move can be played
- cecp_name = 'losers'
- name = 'Losers'
- need_initial_board = False
- standard_rules = False
- variant = 21
- variant_group = 4
- pychess.Variants.losers.testKingOnly(board)
Checks to see if if a winning position has been acheived
pychess.Variants.normal module
Standard Chess game
pychess.Variants.pawnodds module
Pawn Odds Variant
- class pychess.Variants.pawnodds.PawnOddsBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
A standard chess game where one side starts with one less
pawn, this is known as giving pawn odds
- cecp_name = 'normal'
- name = 'Pawn odds'
- need_initial_board = True
- standard_rules = True
- variant = 10
- variant_group = 1
pychess.Variants.pawnspassed module
Pawns Passed Chess
- class pychess.Variants.pawnspassed.PawnsPassedBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Standard chess game rules, but where the board setup is defined as all the
white pawns start on the 5th rank and all the black pawns start on the 4th rank
- cecp_name = 'normal'
- name = 'Pawns Passed'
- need_initial_board = True
- standard_rules = True
- variant = 8
- variant_group = 3
pychess.Variants.pawnspushed module
Pawns Pushed Chess
- class pychess.Variants.pawnspushed.PawnsPushedBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Standard chess rules but the start setup position is all the white pawns
start on the 4th rank and all the black pawns start on the 5th rank
- cecp_name = 'normal'
- name = 'Pawns Pushed'
- need_initial_board = True
- standard_rules = True
- variant = 7
- variant_group = 3
pychess.Variants.queenodds module
Queen Odds Variant
- class pychess.Variants.queenodds.QueenOddsBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Standard chess rules but one side starts without a queen
- cecp_name = 'normal'
- name = 'Queen odds'
- need_initial_board = True
- standard_rules = True
- variant = 13
- variant_group = 1
pychess.Variants.racingkings module
The Racing Kings Variation
- class pychess.Variants.racingkings.RacingKingsBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
The Racing Kings variation is where the object of the game
is to bring your king to the eight row.
- cecp_name = 'racingkings'
- name = 'Racing Kings'
- need_initial_board = True
- standard_rules = False
- variant = 29
- variant_group = 4
- pychess.Variants.racingkings.test2KingInEightRow(board)
Test for a winning position
- pychess.Variants.racingkings.testKingInEightRow(board)
Test for a winning position
pychess.Variants.randomchess module
Random Chess
- class pychess.Variants.randomchess.RandomBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Randomly chosen pieces (two queens or three rooks possible)
Exactly one king of each color
Pieces placed randomly behind the pawns
No castling
Black’s arrangement mirrors white’s
- random_start()
- cecp_name = 'wild/3'
- name = 'Random'
- need_initial_board = True
- standard_rules = True
- variant = 4
- variant_group = 2
pychess.Variants.rookodds module
Rook Odds Variant
- class pychess.Variants.rookodds.RookOddsBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
Standard chess rules apply, but one side starts with one less rook
- cecp_name = 'normal'
- name = 'Rook odds'
- need_initial_board = True
- standard_rules = True
- variant = 12
- variant_group = 1
pychess.Variants.seirawan module
pychess.Variants.setupposition module
- class pychess.Variants.setupposition.SetupBoard(setup=True, lboard=None)
Bases:
pychess.Utils.Board.Board
- as_fen(variant)
- move(move, color)
Creates a new Board object cloning itself then applying the move.move to the clone Board’s lboard. If lboard param was given, it will be used when cloning, and move will not be applyed, just the high level Piece objects will be adjusted.
- simulateMove(board, move)
- PROMOTIONS = ()
- PROMOTION_ZONE = ((), ())
- cecp_name = ''
- name = ''
- property ply
- standard_rules = False
- variant = 36
- variant_group = 3
pychess.Variants.shuffle module
Shuffle Variant
- class pychess.Variants.shuffle.ShuffleBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
The shuffle variant uses the standard chess rules with the exception
no castling is allowed and the back rank is shuffled around
- shuffle_start()
- cecp_name = 'nocastle'
- name = 'Shuffle'
- need_initial_board = True
- standard_rules = True
- variant = 2
- variant_group = 2
pychess.Variants.suicide module
Suicide Variation
- class pychess.Variants.suicide.SuicideBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- Description
This is the FICS version of Losing chess used on FICS as suicide chess.
You must capture if you can, and the object is to lose all your pieces or to have no moves left. But in Suicide, the king is just like any other piece. It can move into check and be captured, and you can even promote pawns to kings.
- PROMOTIONS = (8, 7, 6, 5, 4)
- cecp_name = 'suicide'
- name = 'Suicide'
- need_initial_board = True
- standard_rules = False
- variant = 22
- variant_group = 4
- pychess.Variants.suicide.pieceCount(board, color)
pychess.Variants.theban module
Theban Chess Variant
pychess.Variants.threecheck module
Three-check Chess Variant
- class pychess.Variants.threecheck.ThreeCheckBoard(setup=False, lboard=None)
Bases:
pychess.Utils.Board.Board
- cecp_name = '3check'
- name = 'Three-check'
- need_initial_board = False
- standard_rules = False
- variant = 27
- variant_group = 4
- pychess.Variants.threecheck.checkCount(board, color)
pychess.Variants.upsidedown module
Upside-down Chess variant
pychess.Variants.wildcastle module
Wildcastle Chess variant
pychess.Variants.wildcastleshuffle module
Wildcastle shuffle Chess