Skip to content

Commit

Permalink
cleaning target and adding running instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
psrijan committed Mar 16, 2021
1 parent 696a84a commit 41267df
Show file tree
Hide file tree
Showing 65 changed files with 23 additions and 932 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
target/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ Go to Intellij and run the tests individually

![](./results/running_test.png)


## Running the Source Code:

> mvn clean install
> java -jar ./target/ChessValidator-1.0-SNAPSHOT.jar

or

Go to Intellij or any IDE and run the `Main.java` class.
## Report: Static Code Analysis Tool:
For this project, I used two static code analysis tool.
1. Intellij Native Code Analysis
Expand Down
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,19 @@
</dependency>
</dependencies>
</plugin>
</plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.srijan.pandey.chess.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
3 changes: 0 additions & 3 deletions src/main/java/com/srijan/pandey/chess/core/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ private void populateSet(String[] pieceList, boolean isBlackPiece) throws PieceN
public List<String> getMoves(char userPiece, char userRow, char userCol) throws InvalidPieceException {
int row = BoardUtil.getGridRow(userRow);
int col = BoardUtil.getGridColumn(userCol);
System.out.println("User Row: " + userRow + " Row: " + row);
System.out.println("User Col: " + userCol + " Col: " + col);
Piece piece = chessBoard[row][col];

System.out.println("User Piece: " + userPiece);
if (piece == null || userPiece != piece.getPieceVal()) {
throw new InvalidPieceException("The board doesn't have the piece specified in the particular row and column");
}
Expand Down
Binary file removed target/ChessValidator-1.0-SNAPSHOT.jar
Binary file not shown.
Binary file removed target/classes/com/srijan/pandey/chess/Main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 0 additions & 5 deletions target/maven-archiver/pom.properties

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 41267df

Please sign in to comment.