Fixed a bunch of network synchronization bugs
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@510 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
74d8205f30
commit
0c3eb9a283
15 changed files with 137 additions and 94 deletions
|
@ -103,7 +103,8 @@ public class NetworkRoundControlTest {
|
|||
connectionControl.turnStartEvent.emit(testRoundState);
|
||||
assertFalse(connectionControl.turnEnded);
|
||||
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getTable());
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getActivePlayer()
|
||||
.getHand(), testRoundState.getTable(), testRoundState.getTable());
|
||||
|
||||
assertSame(testRoundState.getNthPlayer(3), testRoundState.getActivePlayer());
|
||||
assertFalse(connectionControl.turnStarted);
|
||||
|
@ -111,7 +112,8 @@ public class NetworkRoundControlTest {
|
|||
connectionControl.turnStartEvent.emit(testRoundState);
|
||||
assertFalse(connectionControl.turnEnded);
|
||||
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getTable());
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getActivePlayer()
|
||||
.getHand(), testRoundState.getTable(), testRoundState.getTable());
|
||||
|
||||
assertSame(testRoundState.getNthPlayer(0), testRoundState.getActivePlayer());
|
||||
assertFalse(connectionControl.turnStarted);
|
||||
|
@ -144,7 +146,8 @@ public class NetworkRoundControlTest {
|
|||
connectionControl.turnStartEvent.emit(testRoundState);
|
||||
assertFalse(connectionControl.turnEnded);
|
||||
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getTable());
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getActivePlayer()
|
||||
.getHand(), testRoundState.getTable(), testRoundState.getTable());
|
||||
|
||||
assertSame(testRoundState.getNthPlayer(1), testRoundState.getActivePlayer());
|
||||
assertFalse(connectionControl.turnStarted);
|
||||
|
@ -152,7 +155,8 @@ public class NetworkRoundControlTest {
|
|||
connectionControl.turnStartEvent.emit(testRoundState);
|
||||
assertFalse(connectionControl.turnEnded);
|
||||
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getTable());
|
||||
connectionControl.turnEndEvent.emit(testRoundState.getActivePlayer()
|
||||
.getHand(), testRoundState.getTable(), testRoundState.getTable());
|
||||
|
||||
assertSame(testRoundState.getNthPlayer(2), testRoundState.getActivePlayer());
|
||||
assertFalse(connectionControl.turnStarted);
|
||||
|
|
Reference in a new issue