class_docstr: ## [History](../index.html#History)
  
  This defines when a game ends, calculates the utility and sample chance events (dealing cards).
  
  The history is stored in a string:
  
  * First two characters are the cards dealt to player 1 and player 2
  * The third character is the action by the first player
  * Fourth character is the action by the second player
docstr: Whether the history is terminal (game over).
docstr_tok: ["Whether","the","history","is","terminal","(","game","over",")","."]
code: def is_terminal(self):
      """
      Whether the history is terminal (game over).
      """
      # Players are yet to take actions
      if len(self.history) <= 2:
          return False
      # Last player to play passed (game over)
      elif self.history[-1] == "p":
          return True
      # Both players called (bet) (game over)
      elif self.history[-2:] == "bb":
          return True
      # Any other combination
      else:
          return False
  
imports: from typing import List, cast, Dict
  import numpy
  from labml import experiment
  from labml.configs import option
  from labml_nn.cfr import History, InfoSet, Action, Player, CFRConfigs
  from labml_nn.cfr.infoset_saver import InfoSetSaver
label_desc: Use image node_id 2 for calling the History obj's underlying member method code with example usage: obj.is_terminal() and returns: False, True, True, False