code: def result(self, s, a):
          '''Result of applying an action to a state.'''
          # result: boat on opposite side, and numbers of missioners and
          # cannibals updated according to the move
          if s[2] == 0:
              return (s[0] - a[1][0], s[1] - a[1][1], 1)
          else:
              return (s[0] + a[1][0], s[1] + a[1][1], 0f result(self, s, a):
          '''Result of applying an action to a state.'''
          # result: boat on opposite side, and numbers of missioners and
          # cannibals updated according to the move
          if s[2] == 0:
              return (s[0] - a[1][0], s[1] - a[1][1], 1)
          else:
              return (s[0] + a[1][0], s[1] + a[1][1], 0)
docs: Result of applying an action to a state.