-4
我有这个C#类和我想要实现这个在F#C#向F#的乐趣
using System;
using AIInterface;
using Boards;
namespace TTTAiCSharpAlphaBate
{
public class AI : IAI
{
private int symbol;
Board cBoard;
int aiLevel = 1;
string IAI.GetAIName()
{
return "C#AlphaBetaAi";
}
string IAI.GetAIVersion()
{
return "1.0.0";
}
void IAI.SetAI(Boards.Board board, int level, int symbol)
{
cBoard = board;
this.symbol = symbol;
aiLevel = level;
}
int[] IAI.GetLevel()
{
return new int[1] { 3 };
}
int IAI.AIMove()
{
throw new NotImplementedException();
}
}
}
到目前为止,我能走到今天
#if Board
#r @"c:\..\bin\Debug\Boards.dll"
#r @"c:\..\bin\Debug\AIInterface.dll"
#endif
module TTTAiFSharpAlphaBeta
open AIInterface
open Boards
type AI()=
interface IAI with
member this.SetAI (board: Board ,level:int, symbol:int) =
[错误位置]意外的关键字“成员“在表达
member this.cboard = board
member this.level = level
member this.symbol = symbol
[错误这里] 定义中的此点或之前的不完整结构化构造 。在此点或其他标记之前或之前构建的预期不完整结构 。
东西在猜测,它显示了很少的研究工作。 –