Flowchart
Untitled
Flowchart content
chess
package Ajedrez
----------------------------------------------------------------
public static void main()
chessGUI
package Ajedrez
----------------------------------------------------------------------------------
private; windowChessBoard mainChessBoard
private; objCreateAppletImage createImage
private; JButton cmdNewGame, cmdSetNames
private; JTextField txtPlayerOne, txtPlayerTwo
private; JLabel lblPlayerOne, lblPlayerTwo,lbltitulo
private; Color clrBlue = new Color(222, 184, 135)
private; MediaTracker mt
----------------------------------------------------------------------------------
public Container createGUI(JFrame mainApp)
public void actionPerformed(ActionEvent e)
public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e)
public void windowGainedFocus(WindowEvent e)
public void windowLostFocus(WindowEvent e)
objBishop
package Ajedrez
------------------------------------------------------------------
public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix)
objCellMatrix
package Ajedrez
----------------------------------------------------------------------------------
private; int[][] playerMatrix = new int[8][8]
private; int[][] pieceMatrix = new int[8][8]
----------------------------------------------------------------------------------
public void resetMatrix()
public int getPlayerCell(int row, int column)
public int getPieceCell(int row, int column)
public void setPlayerCell(int row, int column, int player)
public void setPieceCell(int row, int column, int piece)
public int[][] getPlayerMatrix()
public int[][] getPieceMatrix()
public boolean checkWinner(int currentPlayer)
objChessBoard
package Ajedrez
----------------------------------------------------------------------------------
protected; objPaintInstruction currentInstruction = null
protected; Vector vecPaintInstructions = new Vector()
----------------------------------------------------------------------------------
public void update(Graphics g)
public void paint(Graphics g)
private void drawTile(int row, int column, Graphics g)
protected int findWhichTileSelected(int coor)
protected void drawExtra(Graphics g)
objChessPieces
package Ajedrez
----------------------------------------------------------------------------------
protected int; finalDesRow = 0
protected int; finalDesColumn = 0
protected String; strErrorMsg = ""
----------------------------------------------------------------------------------
private boolean checkAxisMove(int newRow, int newColumn, int[][] playerMatrix)
protected boolean axisMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix, boolean straightAxis)
public int getDesRow()
public int getDesColumn()
public String getErrorMsg()
objCreateAppletImage
package Ajedrez
----------------------------------------------------------------------------------
private String; strErrorMsg = ""
----------------------------------------------------------------------------------public Image getImage(Object parentClass, String path, int fileSize)
public ImageIcon getImageIcon(Object parentClass, String path, String description, int fileSize)
public void objCreateAppletImage()
public String getErrorMsg()
private byte[] createImageArray(Object parentClass, String path, int fileSize)
objKing
package Ajedrez
----------------------------------------------------------------------------------public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix)
objKnight
package Ajedrez;
----------------------------------------------------------------------------------public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix)
objPaintInstruction
package Ajedrez
----------------------------------------------------------------------------------
private int startRow = 0, startColumn = 0, rowCells = 0, columnCells = 0;
----------------------------------------------------------------------------------public objPaintInstruction(int firstRow, int firstColumn)
public objPaintInstruction(int startRow, int startColumn, int numCells)
private void calculateRedrawCells(int firstRow, int firstColumn)
public void setMatrix(int firstRow, int firstColumn)
public void setMatrix(int startRow, int startColumn, int numCells)
public int getStartRow()
public int getStartColumn()
public int getRowCells()
public int getColumnCells()
objPawn
package Ajedrez;
----------------------------------------------------------------------------------public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix, int currentPlayer)
objQueen
package Ajedrez;
----------------------------------------------------------------------------------public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix)
objRock
package Ajedrez;
----------------------------------------------------------------------------------public boolean legalMove(int startRow, int startColumn, int desRow, int desColumn, int[][] playerMatrix)
windowChessBoard
package Ajedrez
-----------------------------------------------------------------------------------------------------
private final int refreshRate = 5;
private Image[][] imgPlayer = new Image[2][6];
private String[] strPlayerName = {"Jugador 1", "Jugador 2"};
private String strStatusMsg = "";
private objCellMatrix cellMatrix = new objCellMatrix();
private int currentPlayer = 1, startRow = 0, startColumn = 0, pieceBeingDragged = 0;
private int startingX = 0, startingY = 0, currentX = 0, currentY = 0, refreshCounter = 0;
private boolean firstTime = true, hasWon = false, isDragging = false;
private objPawn pawnObject = new objPawn();
private objRock rockObject = new objRock();
private objKnight knightObject = new objKnight();
private objBishop bishopObject = new objBishop();
private objQueen queenObject = new objQueen();
private objKing kingObject = new objKing();
-----------------------------------------------------------------------------------------------------
public windowChessBoard()
private String getPlayerMsg()
private void resetBoard()
public void setupImages(Image[] imgRed, Image[] imgBlue)
public void setNames(String strPlayer1Name, String strPlayer2Name)
protected void drawExtra(Graphics g)
public void newGame()
private void checkMove(int desRow, int desColumn)
private void unsucessfullDrag(int desRow, int desColumn)
private void updatePaintInstructions(int desRow, int desColumn)
public void mouseClicked(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvent e)
public void gotFocus()
Information
- Description
- Flowchart on Untitled, created by Barbara Jazmín Reyes on 27/11/2018.
- Created by
- Barbara Jazmín Reyes
- Views
- 0
- Rating