public boolean updateModel(Piece piece, PossibleTile pt) {
		for (Piece p : this.gm.getBoard().getPieces()) {
			if (p instanceof Pawn) {
				Pawn pawn = (Pawn) p;
				pawn.setPossibleToPassant(false);
			}
		}
		Board b = this.gm.getBoard();
		if (
			b.isWhiteTurn() == piece.isWhite() &&
			b.isWhiteTurn() == this.isWhite
		) {
			ArrayList<PossibleTile> tiles = new ArrayList<PossibleTile>();
			tiles.add(new PossibleTile(piece.getX(), piece.getY(), piece));
			tiles.add(pt);
			b.nextTurn();
			b.removePiece(piece);
			Piece clone = pt.getOriginalPiece();
			clone.setX(pt.getX());
			clone.setY(pt.getY());
			clone.setSelected(false);
			b.addPiece(clone);
			if (pt.hasPieceToRemove()) {
				Piece removedPiece = pt.getRemovePiece();
				b.removePiece(removedPiece);
 				this.gm.resetMoveRule();
				if (piece instanceof Pawn) {
					this.gm.resetMoveRule();
					if (!((Pawn)clone).canPromote()) {
						b.addMove(new int[] {clone.getUID(), pt.getX(), pt.getY(), removedPiece.getUID()});
					}
				} else {
					b.addMove(new int[] {clone.getUID(), pt.getX(), pt.getY()});
				}
			} else {
				if (piece instanceof Pawn) {
					this.gm.resetMoveRule();
					if (!((Pawn)clone).canPromote()) {
						b.addMove(new int[] {clone.getUID(), pt.getX(), pt.getY()});
					}
				} else {
					this.gm.increaseMoveRule();
					b.addMove(new int[] {clone.getUID(), pt.getX(), pt.getY()});
				}
			}
			this.gm.getBoard().setPrevTiles(tiles);
			this.gm.updateBoard(b, false);
			return true;
		}
		return false;
	}