【发布时间】:2015-03-11 01:52:06
【问题描述】:
我目前正在尝试制作国际象棋游戏并尝试实现接口但我无法访问该接口。
public interface IChessPiece
{
bool CheckMove(int row, int col);
}
public class ChessPiece { ... }
public class Pawn : ChessPiece, IChessPiece
{
public bool CheckMove(int row, int col) { ... }
}
public class ChessPieces { public List<ChessPieces> chessPieces; ... }
我似乎无法访问 CheckMove() 方法。
board.chessPieces.Find(x => <condition>).CheckMove(row, col);
【问题讨论】: