ChessBoard Application

ChessBoard Problem Statement

The chessboard is an 8 x 8 grid with 64 cells in it.
With 8 rows (A, B, C.... H) and 8 columns (1, 2, 3.... 8), each cell can be uniquely
identified with its cell number. This can be seen illustrated below.
Chess pieces and their movements:

The game of chess has 6 unique types of pieces, with their own unique types
of movements. These are:
1.) King – Can move only 1 step at a time in all 8 directions (horizontal, vertical
and diagonal)
2.) Queen – Can move across the board in all 8 directions
3.) Bishop – Can move across the board only diagonally
4.) Horse – Can move across the board only in 2.5 steps (2 vertical steps and 1
horizontal step)
5.) Rook – Can move across the board only vertically and horizontally

6.) Pawn – Can move only 1 step at a time, in the forward direction, vertically.
Can also move 1 step forward diagonally, in order to eliminate an opposing
piece.

Chessboard

Objective of your program:

Your program should simulate the movement of each unique chess piece on an empty chessboard.

Assumption:

Assume that the board is empty. This means that the pawn cannot move diagonally.

Sample inputs and outputs:

Input – “King D5” Output – “D6, E6, E5, E4, D4, C4, C5, C6”

Technical Design

Class Diagram

Classdigram

Technology Stack Used

  1. Java 8u252
  2. Junit 5
  3. Mockito 2.2
  4. Maven
  5. slf4j