Skip to content
Snippets Groups Projects
Commit 57a3ec43 authored by dragapsy's avatar dragapsy
Browse files

Tache 9 (Ajout de la classe ComputerPlayer + la methode Color play()):

parent 4c2a6ae1
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,15 @@ package model;
import javafx.scene.paint.Color;
public class ComputerPlayer implements Player{
private Strategy Strategy;
private String name;
private Cell StartCell;
private SquareCell cell;
public Color play(){
return cell.getColor();
return this.Strategy.play(startCell);
}
@Override
public boolean isHuman() {
......
package model;
import javafx.scene.paint.Color;
public interface Strategy {
Color play(Cell startCell);
//à partir de certte interface, je devais créer des classes qui l'impelemente, dont chacune s'agit d'une strategie, auquel je vais redefinir la methode play
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment