public static Cell[] calculateCells(BigInteger biNumber){
    
        List<? super Cell> cellList = new ArrayList<>();
        
        BigInteger leftNumber = biNumber;
        Cell cell;
        BigInteger base = BigInteger.valueOf(Piece.values().length + 2);
        
        while(leftNumber.intValue() > 0){
        
            BigInteger ordinal = leftNumber.mod(base);
            leftNumber = leftNumber.divide(base);
            
            switch(ordinal.intValue()){
                case 0:{
                    cell = Cell.DEFAULT_EMPTY_CELL;
                    break;
                }
                case 1:{
                    cell= Cell.DEFAULT_TAKEN_CELL;                
                    break;
                }
                default:{
                Piece piece = Piece.getPieceFromOrdinal(ordinal.intValue() -2);
                cell = new PieceCell(piece);
                }
            }
            
            cellList.add(cell);
        }
        
        Cell[] out = cellList.toArray(new Cell[cellList.size()]);
        return out;
    }