/usr/share/pyshared/pychess/Variants/losers.py is in pychess 0.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Losers Chess
from pychess.Utils.const import *
from pychess.Utils.lutils.bitboard import bitLength
from pychess.Utils.Board import Board
class LosersBoard(Board):
variant = LOSERSCHESS
class LosersChess:
__desc__ = _("FICS losers: http://www.freechess.org/Help/HelpFiles/losers_chess.html")
name = _("Losers")
cecp_name = "losers"
board = LosersBoard
need_initial_board = False
standard_rules = False
variant_group = VARIANTS_OTHER
def testKingOnly(board):
boards = board.boards[board.color]
return bitLength(boards[PAWN]) + bitLength(boards[KNIGHT]) + \
bitLength(boards[BISHOP]) + bitLength(boards[ROOK]) + \
bitLength(boards[QUEEN]) == 0
|