I have 2 classes for the game i am making,
gui class and the logic class, for a game of noughts and crosses. The GUI class has a method that uses an array of JButtons and returns them all with the same anonymous inner class action listener
The problem is this, when i click the button i want the text to change to an x or a o dependant on player 1 or 2 go, but this code should be in the logic class shouldnt it so somehow i should be making a method in the logic class and calling it from the anon inner class action listener of the make button method. However, the logic class shouldnt have a reference to the gui, as the gui has a reference to the logic class,
i cant think of a decent solution to this
thanks