Solve games and problems reducible to exact-cover problem using Knuth's Algorithm X with Dancing Links