@Override
	public void keyReleased(KeyEvent event) {
		int key = event.getKeyCode();
		if(key == KeyEvent.VK_UP){
			if(screen.checkRotate(current, currentCol, currentRow, orientation)) {
				screen.removePiece(current, currentCol, currentRow, orientation);
				orientation = (orientation+1)%4;
				screen.addPiece(current, currentCol, currentRow, orientation);
			}
			screen.paintScreen();
		} else if(key == KeyEvent.VK_DOWN){
			if(screen.validate(current, currentCol, currentRow + 1, orientation)) {
				screen.moveDown(current, currentCol, currentRow++, orientation);
			}
			screen.repaint();
		} else if(key == KeyEvent.VK_LEFT) {
			if(screen.checkLeft(current, currentCol, currentRow, orientation)){
				screen.removePiece(current, currentCol, currentRow, orientation);
				screen.moveLeft(current, currentCol--, currentRow, orientation);
			}
			screen.repaint();
		} else if(key == KeyEvent.VK_RIGHT){
			if(screen.checkRight(current, currentCol, currentRow, orientation)) {
				screen.removePiece(current, currentCol, currentRow, orientation);
				screen.moveRight(current, currentCol++, currentRow, orientation);
			}
				screen.repaint();
		}
		repaint();
	}