Expert
1389 Order Completed 97 % Response Time 56 Reviews Since 2013

Online Java Assignment Helper

Las Vegas, USA

Humphrey, J

PhD. in Programming, University of Nevada, USA

Profession

Online Java Assignment Helper

Skills

I have gained massive experience in Java programming from handling students’ assignments. Before I joined the academic assistance industry, I worked as a Java programmer in one of the IT firms here in Las Vegas. The skills I learned then helped me secure a position as a Java assignment helper at ProgrammingHomeworkHelp.com, where I have been assisting students with projects, homework, and assignments related to Java. I have tackled assignments on various Java topics including data types and operators, control flow statements, classes and objects, polymorphism, encapsulation, static variables and methods, and properties of constructors, to name a few. My well thought out approach to assignment preparation coupled with my vast experience in this language has helped me deliver valuable Java assignment solutions to students. Hire me today for exceptional assistance with Java.

Get Free Quote


 Your Order has been sent successfully. We will contact you as soon as possible.
Error: Please try again

Game Mechanics

The following diagram contains all classes (and interfaces) which take part in-game mechanics.

Game Mechanics

Now, we will take a look at each of these classes and interfaces and each of its methods

IGame

The main chess game interface. Implemented by class Game.java.

init() Initiates chess game. Sets game state to start positions.

make turn() Makes the next turn of the game: asks the current player for the move and applies it.

isOver() Returns true or false, depending on if the game is over or not.

getGameState() Return game status of the game. Game status is presented by enum GameStatus.java.

showPosition() Shows current game state. In my implementation, if shows board and a player to make move.

getNotation() Returns a string, containing all moves in chess notation format. It is output after the game is over.

IGameState

Interface representing the current game state. Implemented by class GameState.java.

init() Initiates games state. Sets game status to initial status (GameStatus.WHITE_TURN) and board to initial position.

getPossibleMoves() Returns collection of moves, which are possible in current game state.

make a turn(IMove) Returns new IGameState instance, which is obtained after a given move is applied to the current game.

getGameStatus() Returns current game status of current game state.

evaluate() Gets evaluation of current game state. It is used by MinimaxAIPlayer to evaluate the current situation.

GameStatus

Enum, representing game status. It contains 5 values: WHITE_TURN, BLACK_TURN, WHITE_WON, BLACK_WON, DRAW. Values have method isOver(), which returns false for WHITE_TURN, BLACK_TURN, and true for WHITE_WON, BLACK_WON, DRAW.

Color

Enum, representing color (of player, of pieces, etc). It contains 2 values: WHITE and BLACK.

IBoard

Interface, representing chessboard. Implemented by class Board.java.

init() Initiates board: in particular puts chess pieces on their start positions.

getPiece(ILocation) Returns piece on the given location of the board.

makeTurn(IMove) Returns new IBoard instance, which is obtained after a given move is applied to the current board.

getPossibleMoves(GameStatus) Returns a collection of moves, which are possible on the current board state with given game status.

updateGameStatus(GameStatus) Returns the new value of game status, obtained after given game status.

isCheck(Color) Returns true if the king of a given color is checked, and false – otherwise.

isCheckmate (Color) Returns true if the king of a given color is checkmated, and false – otherwise.

IPiece

Interface, representing chess piece. Implemented by multiple classes: one class for each chess piece type.

getColor() Returns color of piece.

canMove(IBoard, ILocation, ILocation) Checks, if the current piece can move to one location to another on the given board.

canCapture(IBoard, ILocation, ILocation) Checks, if the current piece can capture opponents’ pieces on location from another on the given board.

controls(IBoard, ILocation, ILocation) Checks, if the current piece controls one location from another. Indeed this method is needed to check if King can move to some location.

● getTextView() Returns string, representing current piece in the text view.

getNotation() Returns string, representing current piece in chess notation.

evaluate() Returns evaluation of current chess piece. It is used to calculate current board evaluation.

parsePiece(String) Static method for parsing IPiece instance from the string.

IMove

Interface, representing chess move. Implemented by Move.java, Castling.java, Capture, java.

getPositionChanges() Returns collection of location pairs: each pair represents “from” and “to” location.

parseMove() Static method for parsing IMove instance from the string.