Network and Frontend #10

Merged
lgc merged 29 commits from ole into main 2024-12-03 12:13:28 +00:00
6 changed files with 2 additions and 23 deletions
Showing only changes of commit cecc44abf4 - Show all commits

View File

@ -1,10 +1,8 @@
import java.util.Random;
public abstract class AiPlayer extends Player {
public abstract class AiPlayer extends LocalPlayer {
public AiPlayer(int size) {
super(size);
}
public AiPlayer() {}
public Point RandomPoint() {
Random random = new Random(); // Pseudo Random für zufallszahlen
int posx = random.nextInt(super.board.getSize()); // Generiert 0 - 13

View File

@ -1,7 +1,4 @@
public class HumanPlayer extends LocalPlayer {
public HumanPlayer(int size) {
super(size);
}
}

View File

@ -1,9 +1,5 @@
public class LocalPlayer extends Player {
LocalPlayer(int size) {
super(size);
}
@Override
public synchronized void receiveShoot(Point point) {
HitResponse hitResponse = board.getHitResponsOnPoint(point);

View File

@ -1,7 +1,3 @@
public class SpecificAiPlayerEasy extends AiPlayer{
public SpecificAiPlayerEasy(int size) {
super(size);
}
}

View File

@ -1,7 +1,3 @@
public class SpecificAiPlayerHard extends AiPlayer{
public SpecificAiPlayerHard(int size) {
super(size);
}
}

View File

@ -5,10 +5,6 @@ public class SpecificAiPlayerMedium extends AiPlayer{
private List<Point> hitsQueue = new ArrayList<>();
public SpecificAiPlayerMedium(int size) {
super(size);
}
@Override
public void AiShoot() {
Point nextShot = ComputeNextShot();