def METHOD_NAME(self):
    if self.playButton.isChecked():
        icon = QtGui.QIcon()
        self.playButton.setText("Stop Code")
        self.playButton.setStyleSheet("background-color: #ec7063")
        icon.addPixmap(QtGui.QPixmap(":/images/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.playButton.setIcon(icon)
        self.algorithm.play()
    else:
        icon = QtGui.QIcon()
        self.playButton.setStyleSheet("background-color: #7dcea0")
        icon.addPixmap(QtGui.QPixmap(":/images/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.playButton.setIcon(icon)
        self.playButton.setText("Play Code")
        self.algorithm.stop()
        self.setXYValues(0, 0)
        self.teleop.stopSIG.emit()