After a slight blip yesterday, I am back to trying to like Play. I’va made some good progress today, I think. My human v human game is working, though I am a little unsure about it. It’s still the issue with the Human Player and the Input that I can’t figure out. To get it working initially I created a WebPlayer that did not take an Input. This feels like an LSP violation as the getLocation() method would never actually be used. When I started to create different types of games, I reimplemented the GameConstructor class which creates the players and game according to an inputted choice. I had the same problem with Input, as the Constructor needs the type of input to pass to a human player. So I created a WebInput class that implemented the Input interface. I doesn’t really do anything, and even when passed to the HumanPlayer will never get called, so it also feels like an LSP violation. I’m not really sure how to proceed with the HumanPlayer so I’ve asked for help and hopefully will have a clearer idea.

In the meantime, I can carry on with the other players and gametypes. IntelliJ is working ok, so that’s making life easier. My main issue at the moment is that I feel like I don’t really know what I am doing. I’m really unsure about how a web application should be designed, and sometimes I feel a little paralysed by that. If I don’t know where a method should go, I can spend forever deliberating it and become far less productive. One thing that has really helped me get through this is being really strict with my TDD. I write a test, and I just make it pass as fast as I can. I don’t worry about where the needed code should go, I just make the test pass. Then, once I’ve got the code, I can consider it. At the moment, my GameController is quite fat and growing, though I can’t quite see a pattern to refactor. I am sure, however, it will come. I have some tests in my GameController test suite that don’t quite feel the same as the others, which indicated that, perhaps, they should be somewhere else. By really sticking with the red, green, refactor loop I am making much better progress and, I hope, gaining a little more intuition about how my code should look.

I will carry on with the rest of my game types tomorrow and as my codebase grows I hope I’ll be able to see more clearly where things belong. The good news is that Play is only sometimes behaving strangely, and most of the time is working as expected.