Today was lots of practicing wa-tor and also refactoring tic-tac-toe. Wa-tor seems to be going pretty good, but I still need to find a way to shave some time off, without sacrificing code quality. Tic-tac-toe was going back and adding more test coverage from two weeks ago when I was in panic mode over wa-tor and abandoned my test driven development principles (I highly do not recommend that.) If you believe what you are doing is the best way of doing things, it makes zero sense to abandon them in moments of crisis when you think about it.

One thing I changed up on tic-tac-toe instead of test was the way some of my printables print. I feel like I’m getting really close to making this code well organized but still seems I’m missing a piece.

Doseq has the same syntax as for (the list comprehension function), except it deals with side effects.

(defn print-get-board-size []
  (doseq [lines ["What size board would you like to play on? (3 or 4 currently supported)"
                 "1. 3x3"
                 "2. 4x4"
                 "3. 3x3x3 (3-D)"]]
    (println lines)))

This may be an extra line vs how I had it before:

(defn print-get-board-size
      (println "What size board would you like to play on? (3 or 4 currently supported)")
      (println "1. 3x3")
      (println "2. 4x4")
      (println "3. 3x3x3 (3-D)"))

But it also looks less cluttered. I ran out of time trying to get it done today, but I feel like I’ll be able to make one print function that handles anything printable using this, and get rid of the print in all the name, instead have it print the proper thing for each function.

How I want it to identify what it’s time to print I’m not sure about yet, but I’m sure if I ponder that for another day or two it’ll come to me.