public static void placePiece(int i, int j, JButton[][] chessSquare) {
		try {	
			if(possibleMoves[i][j]){
				if(ChessPiece.chessPieces[oldPosRow][oldPosCol].compareTo("DarkRookRight") == 0) {
					moveCounterDarkRight++;
				} else if(ChessPiece.chessPieces[oldPosRow][oldPosCol].compareTo("DarkRookLeft") == 0) {
					moveCounterDarkLeft++;
				} else if(ChessPiece.chessPieces[oldPosRow][oldPosCol].compareTo("LightRookRight") == 0) {
					moveCounterLightRight++;
				} else if(ChessPiece.chessPieces[oldPosRow][oldPosCol].compareTo("LightRookLeft") == 0) {
					moveCounterLightLeft++;
				}
				
				ChessPiece.chessPieces[i][j] = newPiece;
				ChessPiece.chessPiecesTypes[i][j] = newType;
				ChessPiece.chessPiecesPositions[i][j][0] = i;
				ChessPiece.chessPiecesPositions[i][j][1] = j;
				ChessPiece.chessPieces[oldPosRow][oldPosCol] = ChessPiece.empty;
				ChessPiece.chessPiecesTypes[oldPosRow][oldPosCol] = ChessPiece.typeOfPiece.NONE.toString();
				ChessPiece.chessPiecesPositions[oldPosRow][oldPosCol][0] = -1;
				ChessPiece.chessPiecesPositions[oldPosRow][oldPosCol][1] = -1;
				chessSquare[oldPosRow][oldPosCol].setIcon(null);
				if(newType.compareTo("LIGHT") == 0)
					chessSquare[i][j].setIcon(new ImageIcon(GUIchess.getLightRook()));
				else
					chessSquare[i][j].setIcon(new ImageIcon(GUIchess.getDarkRook()));
				GUIchess.setActive(true);
				
				Game.setPlayer(!Game.isPlayer());
				if (Game.isPlayer())
					Game.setActivePlayer(Players.getUserName() + " (light) ");
				else
					Game.setActivePlayer(Players.getUserName2() + " (dark) ");
				GUIchess.setLabelMessage(Game.getActivePlayer() + " 's round");
				GUIchess.setActive(true);GUIchess.setMovesDisplay(ChessPiece.chessPieces[i][j] + 
						"  " + GUIchess.rowConverter(oldPosCol) + 
						(oldPosRow+1) + " -> " + GUIchess.rowConverter(j) + (i+1) + "\n");
				logger.info("DarkRookRight's number of moves: " + getMoveCounterDarkRight());
				logger.info("DarkRookLeft's number of moves: " + getMoveCounterDarkLeft());
				logger.info("LightRookRight's number of moves: " + getMoveCounterLightRight());
				logger.info("LightRookLeft's number of moves: " + getMoveCounterLightLeft());
			} else {
				throw new Exception();
			}
		} catch(Exception e) {
			logger.error("Invalid move!");
			GUIchess.setActive(true);
		}
	}