This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
google colabでusiプロトコルの対局エンジンを動かすためのプロトタイプ | |
TODO: | |
いろいろとデバッグ | |
時間設定と自分の使用した時間の管理 | |
読み筋などの表示 | |
対局結果の取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fv40(board): | |
p_index, q_index = [], [] | |
for square in range(81): | |
piece = board.piece(square) | |
if piece == 0: | |
continue | |
piece_type = piece & 0xF | |
if piece_type != 8: | |
piece_color = piece >> 4 |