-1

I have created a Connect 4 game for my final year project which has both multiplayer and singleplayer. It uses Monte-Carlo Tree Search to play against the computer. I am doing a report based on this and would like to know what design pattern/architectural pattern this is.

Click here for the UML Diagram

I suspect that it could be either Model-View-Controller or a form of Facade.

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
  • 1
    This is simply no pattern. I also suspect you missed generalizations in that diagram. – qwerty_so Mar 06 '18 at 20:27
  • It's tricky to tell from this diagram. I'm not seeing anything I recognise. I note the term State, but it's not possible to tell whether the state pattern is used (I see no concrete state types). MVC -- no (View and Presenter look to be the same class & where's the controller?). Facade -- no (nothing really looks facade-ish -- they all look like proper domain types to me except Presenter). You do appear to have used inheritance (Player) but that's not a pattern per se, more just a basic of OO. So, yeah -- what Thomas said! – muszeo Mar 07 '18 at 07:19
  • I would strongly suggest to use an actual UML modelling tool to create UML diagrams. It looks like you are using MS-Word + Paint or something like that. – Geert Bellekens Mar 07 '18 at 08:56
  • @muszeo The Presenter class is my controller. The Game class is my model and my FXML file is the view. Does that make sense for a MVC pattern? – Semon Ganguly Mar 12 '18 at 18:37
  • Hey, if you're using JavaFX then you're probably already using MVC. If the Presenter class is playing the role of Controller this is a bit confusing as there is an associated pattern called MVP (Model View Presenter) which is different to MVC. Also, in your model you're missing the View part -- I realise this is FXML but you might consider representing it somehow to be clear? – muszeo Mar 13 '18 at 06:51

1 Answers1

0

Not everything fits a known pattern, like in your case.

Boris Modylevsky
  • 3,029
  • 1
  • 26
  • 42