Tile logic, possibly complete