private ulong GetAllWhites(string data) { return FenToUInt64Converter.GetUInt64(Piece.WhitePawns, data) + FenToUInt64Converter.GetUInt64(Piece.WhiteKnights, data) + FenToUInt64Converter.GetUInt64(Piece.WhiteBishops, data) + FenToUInt64Converter.GetUInt64(Piece.WhiteRooks, data) + FenToUInt64Converter.GetUInt64(Piece.WhiteQueens, data) + FenToUInt64Converter.GetUInt64(Piece.WhiteKing, data); }
private ulong GetAllBlacks(string data) { return FenToUInt64Converter.GetUInt64(Piece.BlackPawns, data) + FenToUInt64Converter.GetUInt64(Piece.BlackKnights, data) + FenToUInt64Converter.GetUInt64(Piece.BlackBishops, data) + FenToUInt64Converter.GetUInt64(Piece.BlackRooks, data) + FenToUInt64Converter.GetUInt64(Piece.BlackQueens, data) + FenToUInt64Converter.GetUInt64(Piece.BlackKing, data); }
public string[] Run(string[] data) { ulong blockers = GetAllBlockers(data[0]); ulong associateBlockers = GetAllWhites(data[0]); return new[] { GetRookMask(FenToUInt64Converter.GetUInt64(Piece.WhiteRooks, data[0]), blockers, associateBlockers).ToString(), GetBishopMask(FenToUInt64Converter.GetUInt64(Piece.WhiteBishops, data[0]), blockers, associateBlockers).ToString(), GetQueenMask(FenToUInt64Converter.GetUInt64(Piece.WhiteQueens, data[0]), blockers, associateBlockers).ToString(), }; }
public string[] Run(string[] data) { return(new [] { FenToUInt64Converter.GetUInt64(Piece.WhitePawns, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.WhiteKnights, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.WhiteBishops, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.WhiteRooks, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.WhiteQueens, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.WhiteKing, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackPawns, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackKnights, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackBishops, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackRooks, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackQueens, data[0]).ToString(), FenToUInt64Converter.GetUInt64(Piece.BlackKing, data[0]).ToString() }); }