I
iMohed
I guess the title says it all. I just dont understand why i cant cal
my Main.play() from my Model class. Both in the same package.
Model class short :
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
clickButton(source);
}
public void clickButton(Object o) {
int i = 0;
for (MButton s : this.but) {
if (s == o) {
Main.play(i);
}
}
}
Main class short :
public void play(int k) throws IOException {
while (game.finish == false) {
game.doTurn(k);
int j = 0;
for (Model.Square squares : game.sq) {
communication[j] = squares.value;
j++;
}
gameGfx.setColors(communication);
}
}
Any ideas guys and gals ??
Mohamed Haidar.
my Main.play() from my Model class. Both in the same package.
Model class short :
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
clickButton(source);
}
public void clickButton(Object o) {
int i = 0;
for (MButton s : this.but) {
if (s == o) {
Main.play(i);
}
}
}
Main class short :
public void play(int k) throws IOException {
while (game.finish == false) {
game.doTurn(k);
int j = 0;
for (Model.Square squares : game.sq) {
communication[j] = squares.value;
j++;
}
gameGfx.setColors(communication);
}
}
Any ideas guys and gals ??
Mohamed Haidar.