File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments