Permalink
Browse files

Remarks

  • Loading branch information...
1 parent ebf14db commit 772032aaee125577863fce64102d0daefc464cbb @gciolli committed Dec 1, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 libpgchess.sql
View
6 libpgchess.sql
@@ -444,11 +444,13 @@ BEGIN
SELECT array_agg(m.*)
INTO g1.next_moves
FROM prevalid_moves(g1,NOT side) m;
- -- FIXME: g1.next_moves are computed and then thrown
- -- away. Maybe we can optimise by recycling them...
+ -- return the moves m1 whose answers do not "capture"
+ -- the King
IF NOT is_king_under_attack(g1,side) THEN
RETURN NEXT m1;
END IF;
+ -- FIXME: g1.next_moves are computed and then thrown
+ -- away. Maybe we can optimise by recycling them...
END LOOP;
END;
$BODY$;

0 comments on commit 772032a

Please sign in to comment.