コード例 #1
0
    private List <List <Vector2> > GenerateAllowedIndexesForPawn()
    {
        List <List <Vector2> > moves = new List <List <Vector2> >();

        moves.Add(AllowedMovesGenerator.GetMovesForDirection(1, 0, 2));

        return(moves);
    }
コード例 #2
0
ファイル: Pawn.cs プロジェクト: DorelBarbu/my-chess
    public List <List <Vector2> > GetAllowedMoves()
    {
        List <List <Vector2> > moves = new List <List <Vector2> >();

        moves.Add(AllowedMovesGenerator.GetMovesForDirection(1, 0, 3));

        return(moves);
    }
コード例 #3
0
    public List <List <Vector2> > GetAllowedMoves()
    {
        List <List <Vector2> > moves = new List <List <Vector2> >();

        moves.Add(AllowedMovesGenerator.GetMovesForDirection(-1, 1, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(1, 1, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(1, -1, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(-1, -1, Constants.TABLE_SIZE));
        return(moves);
    }
コード例 #4
0
    private List <List <Vector2> > GenerateAllowedIndexesForRook()
    {
        List <List <Vector2> > moves = new List <List <Vector2> >();

        moves.Add(AllowedMovesGenerator.GetMovesForDirection(-1, 0, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(0, 1, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(1, 0, Constants.TABLE_SIZE));
        moves.Add(AllowedMovesGenerator.GetMovesForDirection(0, -1, Constants.TABLE_SIZE));

        return(moves);
    }