Skip to content

Commit b112a2f

Browse files
committed
removed unused code
1 parent 1cfab55 commit b112a2f

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

MinimalChess/MoveCollection.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -113,31 +113,6 @@ public void AddUnchecked(Move move)
113113
}
114114
}
115115

116-
public static class MoveOrdering
117-
{
118-
public static void SortMvvLva(List<Move> moves, Board context)
119-
{
120-
int Score(Move move)
121-
{
122-
Piece victim = context[move.ToIndex];
123-
if (victim == Piece.None)
124-
return 0;//we don't sort those
125-
Piece attacker = context[move.FromIndex];
126-
//Rating: Victims value first - offset by the attackers value
127-
return ((100 * (int)victim) - (int)attacker);
128-
}
129-
moves.Sort((a, b) => Score(b).CompareTo(Score(a)));
130-
}
131-
132-
public static void RemoveNonCapturesAndSortMvvLva(List<Move> moves, Board context)
133-
{
134-
//remove all non captures
135-
moves.RemoveAll(move => context[move.ToIndex] == Piece.None);
136-
//and sort the rest
137-
SortMvvLva(moves, context);
138-
}
139-
}
140-
141116
public class MoveSequence : IMovesVisitor
142117
{
143118
List<(int Score, Move Move)> _captures;

0 commit comments

Comments
 (0)