How can I generate a list of all Tetrominos?
How can I generate a list of all Tetrominos? Or, more generally, how can I generate a subset of the polyominoes restricted to a number of cells? There are many ways to do this. One option that I've found works well is to think about it recursively and more generally. In particular: A single rectangle is a 1-omino. For any n-omino, you can create an (n+1)-omino by putting a block adjacent to any of the blocks from an n-omino. This gives you a recursive way of listing all possible n-ominos. You need to be careful, though, since this will generate multiple rotations and translations of the same n