Skip to content

Create the ultimate minesweeper#3

Open
dakotasanchez wants to merge 1 commit intoAdvancedProgrammingWithJavaSummer2017:masterfrom
dakotasanchez:master
Open

Create the ultimate minesweeper#3
dakotasanchez wants to merge 1 commit intoAdvancedProgrammingWithJavaSummer2017:masterfrom
dakotasanchez:master

Conversation

@dakotasanchez
Copy link

Added "AddRow" method.

Fixed improper 2 space indenting to a more dignified 4 spaces.

Copy link
Member

@DavidWhitlock DavidWhitlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you got off to a good start!

👍

if (row == 0 || column == 0) {
throw new ZeroSizedBoardException();
}
this.inputBoard = new char[row][column];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting choice of data structure. I wonder if an ArrayList would be easier to work with.

}

public String solve() {
// for (int i = 0; i < inputBoard.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. It's hard to resist implementing, isn't it? 😈

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ignore
@Test(expected = ZeroSizedBoardException.class)
public void zeroSizedBoardThrowException() {
public void zeroSizedBoardThrowException() throws ZeroSizedBoardException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using making ZeroSizedBoardException a RuntimeException so that you don't to declare it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants