Java Tic Tac Toe — UML Diagram

Yesterday I was tasked with creating a UML Diagram for my Tic Tac Toe app. The reason for this is to see all of my dependencies in one place, and see if there’s any dependences that I can remove.

Being lazy, I started off the morning seeing if there’s a way I could do this through my IDE, rather than manually creating it. I did find a few things, the best being Code Iris — an IntelliJ Plugin that takes a codebase and creates a diagram of it.

Here’s a screenshot of what Code Iris generated for my Tic Tac Toe app:

All classes

If you hover over something, it’ll show all of it’s interactions:

HumanPlayer

That is a really good, easy way to take a look, but I didn’t think that it would satisfy my requirement of creating a UML diagram for my IPM, so I ultimately did it manually.

This took a significantly longer period of time, but it shows all methods as well. I think it was valuable to do it, as I really got to know my codebase, but going forward I’d definitely prefer to use something like Code Iris.

I struggled with the arrows

Today I’m going to see what I can polish from this diagram, and then research and implement the factory method on a branch, to see if I prefer it to the command pattern. Then I want to take one last look to make sure I’ve got rid of as much duplication as possible.

Like what you read? Give Dan Pelensky a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.