Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

29 Sep 2009

Improve readability with LINQ

At first i was not very fond of LINQ but it seems that i am finally convinced that LINQ may improve readability:

bool IsCompleted()
	var boxesNotOnGoal = from cell in Cells
	where cell.HoldsBox() && !cell.IsGoal()
	select cell.Piece;

	return boxesNotOnGoal.Any();