2018-10-16

notAlone, Team Tic-Tac-Toe
  1. notAlone.

    notAlone :: [Int] -> Int -> [Int]
    notAlone nums x = undefined
    
  2. Team Tic Tac Toe

    • Write teamWins to determine if a given team wins a given three in a row.

      teamWins :: String -> [Char] -> Bool
      teamWins row team = undefined
      
    • Write allThrees, which gets all of the three in a row segments from a board.

      allThrees :: [String] -> [String]
      allThrees board = undefined
      
    • Write allTeams, which produces a list of all possible teams.

      allTeams :: [String]
      
    • Combine the previous functions to solve the problem.

  3. (Bonus.) Family Tree. I use momList to be the list of pairs of strings (mother, child).

    • findParent momList cow produces [] or a list containing the name of the parent of the given cow in a list.

    • parentList momList cow produces a list containing the mother, grandmother, etc. of the given cow. The result could be empty if the cow has no known mother.

    • isRelated momList cow1 cow2 gives True if the cows are related at all.

    isRelated ::  [(String,String)] -> String -> String -> Bool
    isRelated familyTree cow1 cow2 = undefined
    
Last modified August 18, 2023: 2022-2023 End State (7352e87)