Skip to content

Commit

Permalink
Removes unused class
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-oliveira committed Jul 15, 2017
1 parent 0c242c1 commit aadff36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 56 deletions.
5 changes: 2 additions & 3 deletions Minesweeper/src/gameLogic/GameBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import generators.BombPositionGenerator;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;

import java.util.List;
Expand Down Expand Up @@ -33,7 +32,7 @@ public void setupGameBoard() {
int xPos = bomb % 8 - 1;
int yPos = bomb / 8;
gameBoard[xPos < 0 ? 8 - 1 : xPos][yPos].getGameCell().setContainsMine(true);
gameBoard[xPos < 0 ? 8 - 1 : xPos][yPos].getGameCell().setFill(Color.RED);
// gameBoard[xPos < 0 ? 8 - 1 : xPos][yPos].getGameCell().setFill(Color.RED);
}

for (int i = 0; i < 8; i++) {
Expand All @@ -58,7 +57,7 @@ private GameCell getCellInPoz(int i, int j) {
return this.gameBoard[i][j].getGameCell();
}

void neighbourBombsOf(int i, int j) {
private void neighbourBombsOf(int i, int j) {
List<CellPosition> listOfNeighbours = getCellInPoz(i, j).getNeighbours();
int totalBombs = 0;
for (CellPosition listOfNeighbour : listOfNeighbours) {
Expand Down
16 changes: 8 additions & 8 deletions Minesweeper/src/gameLogic/GameCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class GameCell extends Rectangle implements Discoverable {
private int locationX;
private int locationY;

public GameCell(int locationX, int locationY) {
GameCell(int locationX, int locationY) {
super(400 / 8.0, 400 / 8.0, Color.LIGHTGREY);
this.locationX = locationX;
this.locationY = locationY;
Expand All @@ -30,7 +30,7 @@ public GameCell(int locationX, int locationY) {
public List<CellPosition> getNeighbours() {
int coordX = getLocationX() / (400 / 8);
int coordY = getLocationY() / (400 / 8);
System.out.println("X: " + coordX + " -- Y: " + coordY);
// System.out.println("X: " + coordX + " -- Y: " + coordY);
List<Integer> xLeftToRightTopToBottom = new ArrayList<>(Arrays.asList(coordX - 1, coordX, coordX + 1,
coordX - 1, coordX + 1, coordX - 1, coordX, coordX + 1));
List<Integer> yLeftToRightTopToBottom = new ArrayList<>(Arrays.asList(coordY - 1, coordY - 1, coordY - 1,
Expand All @@ -46,31 +46,31 @@ public List<CellPosition> getNeighbours() {
return validNeighbours;
}

public boolean isContainsMine() {
boolean isContainsMine() {
return containsMine;
}

public void setContainsMine(boolean containsMine) {
void setContainsMine(boolean containsMine) {
this.containsMine = containsMine;
}

public int getIndicator() {
int getIndicator() {
return indicator;
}

public void setIndicator(int indicator) {
void setIndicator(int indicator) {
this.indicator = indicator;
}

public int getLocationX() {
private int getLocationX() {
return locationX;
}

public void setLocationX(int locationX) {
this.locationX = locationX;
}

public int getLocationY() {
private int getLocationY() {
return locationY;
}

Expand Down
45 changes: 0 additions & 45 deletions Minesweeper/src/sample/Controller.java

This file was deleted.

0 comments on commit aadff36

Please sign in to comment.