示例#1
0
 async def create_board(self, _ctx, _value=None):
     """
     create a new chess board.
     """
     if _value:
         init_board(_ctx.author.id, _value)
     else:
         init_board(_ctx.author.id)
     await _ctx.send(file=file())
示例#2
0
 async def move(self, _ctx, _move):
     """
     Moves the piece.
     """
     push_san(_ctx.author.id, _move)
     await _ctx.send(file=file())
示例#3
0
 async def board(self, _ctx):
     """
     show user's current chess board.
     """
     show_board(_ctx.author.id)
     await _ctx.send(file=file())
示例#4
0
 async def attacks(self, _ctx, _square):
     """
     Displays attacks on a piece.
     """
     attacks(_ctx.author.id, _square)
     await _ctx.send(file=file())
示例#5
0
 async def undo(self, _ctx):
     """
     Undoes the last move.
     """
     undo(_ctx.author.id)
     await _ctx.send(file=file())