<commit_before>=begin
As a user I want to:
  set number of players
  start the game -- player n
  pick a flashcard
  guess an answer - 2 chances
  want game to end at 5 points
  see the score
  exit the game
=end

=begin

Pseudod

CREATE class Controller
  DEFINE initialize
    INSTANCE OF DECK, an array (flashcard objects) = set_deck ()
    INSTANCE OF PLAYERS, an array (player objects) = set_players (#player)
  END



  DEFINE set_deck (takes 1 argument: csv)
    input: csv
    do: #get_file
        #reads_file
        #creates_flashcard_objects,
        #places_them_into_an_array
    output: array of [Flash card objects]
  END

  DEFINE get_file()
    INPUT : Asks user for file name of DECK
    DO :
    OUTPUT: returns the file name

  DEFINE reads_file(takes 1 argument)
    input : file string, file to read
    DO :    parse file
            calls function #creates_flashcard_objects
    OUTPUT : parsed txt file
  END

  DEFINE creates_flashcard_objects
    input:   parsed txt file
    do:      create flashcard objects
    output:
  END

  DEFINE set_players
    promopt player for players
    input: number of players
    do: ask for number of players and make that many player objects (talk to class Player)
    output: populated @players array
  END

  DEFINE start_game

=end<commit_msg> Pesdeo complete<commit_after>=begin
As a user I want to:
  set number of players
  start the game -- player n
  pick a flashcard
  guess an answer - 2 chances
  want game to end at 5 points
  see the score
  exit the game
=end



Pseudod

CREATE class Controller
  DEFINE initialize
    INSTANCE OF DECK, an array (flashcard objects) = set_deck ()
    INSTANCE OF PLAYERS, an array (player objects) = set_players (#player)
  END



  DEFINE set_deck (takes 1 argument: csv)
    input: csv
    do: #get_file
        #reads_file
        #creates_flashcard_objects,
        #places_them_into_an_array
    output: array of [Flash card objects]
  END

  DEFINE get_file()
    INPUT : Asks user for file name of DECK
    DO :
    OUTPUT: returns the file name

  DEFINE reads_file(takes 1 argument)
    input : file string, file to read
    DO :    read the file
            push each line as string element into array
            slice_each by 3, delete blank element
            [[]]
            iterate through each create flashcard object
    OUTPUT : parsed txt file
  END


  DEFINE set_players

    input: number of players
    do: promopt user for players
        make that many player objects (talk to class Player)
    output: populated @players array
  END

  DEFINE start_game
   input :
   do:  select player
        player picks card from @DECK
        player gets the question
        player enter the answer
          True : increment player score by 1(check if winner exists), go to next player
          False : Allow one more guess
            True : do line 63
            False : No point, go to next player

    output

  DEFINE winner?
    Input. Player objects
    DO : Check score == 5 return True
    Output : Return tru if score ==5

  DEFINE exit()
    INPUT
    DO
    OUPUT  Break out of start_game


{'fraction_non_alphanumeric': 0.043381180223285486, 'fraction_numerical': 0.004465709728867623, 'mean_word_length': 2.45755237045204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6358649', 'n_tokens_mistral': 959, 'n_tokens_neox': 877, 'n_words': 404}