WIP: Second commit for seperating server and client yacht classes

tags: #story[1124]
This commit is contained in:
Haoming Yin
2017-08-15 14:30:39 +12:00
parent d6a436d2eb
commit 2dc0ba07d9
4 changed files with 390 additions and 305 deletions
@@ -10,7 +10,6 @@ import seng302.gameServer.GameState;
import seng302.gameServer.MainServerThread;
import seng302.gameServer.server.messages.BoatAction;
import seng302.model.ServerYacht;
import seng302.model.Yacht;
import seng302.visualiser.ClientToServerThread;
/**
@@ -46,7 +45,8 @@ public class RegularPacketsTest {
long endTime = System.currentTimeMillis();
SleepThreadMaxDelay();
//Allowed to be two loops of delay due to loop delay and processing delay at client + server ends.
Assert.assertEquals(TEST_DISTANCE / Yacht.TURN_STEP * ClientToServerThread.PACKET_SENDING_INTERVAL_MS,
Assert.assertEquals(
TEST_DISTANCE / ServerYacht.TURN_STEP * ClientToServerThread.PACKET_SENDING_INTERVAL_MS,
(endTime - startTime), 2 * ClientToServerThread.PACKET_SENDING_INTERVAL_MS);
}