Skip to content
Snippets Groups Projects
Select Git revision
  • d81c9d6d61d09ca0ea6eb4eefc6923636d961769
  • master default protected
  • revert-d81c9d6d
3 results

ShapeContainer.java

  • Forked from MANSOUR Chadi / graphic-2020-TP5
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    GrayGrid.java 1.17 KiB
    package model;
    
    public class GrayGrid implements Grid{
    
        private final int numberOfRows;
        private final int numnberOfColumns;
    
        public GrayGrid(int numberOfRows, int numberOfColumns){
            this.numberOfRows = numberOfRows;
            this.numnberOfColumns = numberOfColumns;
        }
    
        @Override
        public void color(ColorGenerator colorGenerator) {
    
        }
    
        /**
         * Return the cell located at the given coordinates in the grid.
         *
         * @param row    the row of the returned the cell
         * @param column the column of the returned cell
         * @return the cell located in row {@code row} and in column {@code column}
         */
        @Override
        public Cell getCell(int row, int column) {
            return GrayCell.GRAY_CELL;
        }
    
        /**
         * Return the number of rows of this {@code Grid}
         *
         * @return the number of rows of this {@code Grid}
         */
        @Override
        public int getNumberOfRows() {
            return numberOfRows;
        }
    
        /**
         * Return the number of columns of this {@code Grid}
         *
         * @return the number of columns of this {@code Grid}
         */
        @Override
        public int getNumberOfColumns() {
            return numnberOfColumns;
        }
    }