- Basic penalties have been made for out of bounds and collisions - RaceServer packages and sends BoatState messages for each boat - ServerConnection routes BoatState messages instead of dropping by default - VisualiserRaceCommandFactory produces BoatStateCommands #story[1291]main
parent
a295728e89
commit
50d5dd02a2
@ -0,0 +1,23 @@
|
||||
package visualiser.Commands.VisualiserRaceCommands;
|
||||
|
||||
import mock.model.commandFactory.Command;
|
||||
import network.Messages.BoatState;
|
||||
import visualiser.model.VisualiserRaceState;
|
||||
|
||||
/**
|
||||
* Created by connortaylorbrown on 20/09/17.
|
||||
*/
|
||||
public class BoatStateCommand implements Command {
|
||||
private BoatState boatState;
|
||||
private VisualiserRaceState visualiserRace;
|
||||
|
||||
public BoatStateCommand(BoatState boatState, VisualiserRaceState visualiserRace) {
|
||||
this.boatState = boatState;
|
||||
this.visualiserRace = visualiserRace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
System.out.println(boatState.getBoatHealth());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue