Skip to content

Commit

Permalink
Merge branch 'improve-auto-formatter' of https://github.com/charlesti…
Browse files Browse the repository at this point in the history
…an23/LEGUP into improve-auto-formatter
  • Loading branch information
charlestian23 committed Mar 29, 2024
2 parents 4a71b39 + 1b04c75 commit 1574d7d
Showing 1 changed file with 55 additions and 53 deletions.
108 changes: 55 additions & 53 deletions src/main/java/edu/rpi/legup/model/gameboard/GridRegion.java
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
package edu.rpi.legup.model.gameboard;

import java.util.ArrayList;
import java.util.List;

public abstract class GridRegion<T> {

protected List<T> regionCells;

/**
* Region Constructor
*/
public GridRegion() {
this.regionCells = new ArrayList<>();
}

/**
* Adds the cell to the region
* @param cell cell to be added to the region
*/
public void addCell(T cell) {
regionCells.add(cell);
}

/**
* Removes the cell from the region
* @param cell cell to be remove from the region
*/
public void removeCell(T cell) {
regionCells.remove(cell);
}

/**
* Returns the list of cells in the region
* @return list of cells in region
*/
public List<T> getCells() {
return regionCells;
}

/**
* Returns the number of cells in the region
* @return number of cells in the region
*/
public int getSize(){
return regionCells.size();
}

/*
public void colorRegion(){}
*/

}
package edu.rpi.legup.model.gameboard;

import java.util.ArrayList;
import java.util.List;

public abstract class GridRegion<T> {

protected List<T> regionCells;

/** Region Constructor */
public GridRegion() {
this.regionCells = new ArrayList<>();
}

/**
* Adds the cell to the region
*
* @param cell cell to be added to the region
*/
public void addCell(T cell) {
regionCells.add(cell);
}

/**
* Removes the cell from the region
*
* @param cell cell to be remove from the region
*/
public void removeCell(T cell) {
regionCells.remove(cell);
}

/**
* Returns the list of cells in the region
*
* @return list of cells in region
*/
public List<T> getCells() {
return regionCells;
}

/**
* Returns the number of cells in the region
*
* @return number of cells in the region
*/
public int getSize() {
return regionCells.size();
}

/*
public void colorRegion(){}
*/

}

0 comments on commit 1574d7d

Please sign in to comment.