Poor man's SAT solver in C#