Added WindCommand and multiple command execution to RaceLogic

- Dispatch commands with CompositeCommand
- Single WindCommand handles upwind and downwind logic
- Changed key bindings as Mac lacks PgUp PgDn
- ControllerServer is observable, RaceLogic updates CompositeCommand as observer
This commit is contained in:
Connor Taylor-Brown
2017-08-04 23:08:07 +12:00
parent 851bbb4fde
commit 554f8a2a0f
7 changed files with 127 additions and 8 deletions
@@ -0,0 +1,31 @@
package mock.model.commandFactory;
import mock.model.MockRace;
import network.Messages.Enums.BoatActionEnum;
import org.junit.Before;
import org.junit.Test;
import shared.model.Boat;
import shared.model.Race;
import visualiser.model.VisualiserRace;
import static org.testng.Assert.*;
/**
* Created by connortaylorbrown on 4/08/17.
*/
public class WindCommandTest {
private Race race;
private Boat boat;
private Command upwind;
private Command downwind;
@Before
public void setUp() {
boat = new Boat(0, "Bob", "NZ");
}
@Test
public void upwindCommandDecreasesAngle() {
}
}