def CountPoints(player_state):
  """Returns the number of points given a PlayerState."""
  num_points = 0
  for card in player_state.purchased_cards:
    num_points += card.points
  for noble_tile in player_state.noble_tiles:
    num_points += noble_tile.points
  return num_points