Major refactoring of RoundControl and TurnControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@516 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
1ba3c97583
commit
f5cff88ec9
13 changed files with 487 additions and 446 deletions
|
@ -3,18 +3,16 @@ package jrummikub.control.network;
|
|||
import java.awt.Color;
|
||||
import java.util.UUID;
|
||||
|
||||
import jrummikub.model.IHand;
|
||||
import jrummikub.control.RoundControl.InvalidTurnInfo;
|
||||
import jrummikub.model.IRoundState;
|
||||
import jrummikub.model.ITable;
|
||||
import jrummikub.util.GameData;
|
||||
import jrummikub.util.IEvent;
|
||||
import jrummikub.util.IEvent1;
|
||||
import jrummikub.util.IEvent2;
|
||||
import jrummikub.util.IEvent3;
|
||||
import jrummikub.util.MockEvent;
|
||||
import jrummikub.util.MockEvent1;
|
||||
import jrummikub.util.MockEvent2;
|
||||
import jrummikub.util.MockEvent3;
|
||||
import jrummikub.view.LoginError;
|
||||
|
||||
/** */
|
||||
|
@ -44,9 +42,9 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
/** */
|
||||
public MockEvent1<ITable> tableUpdateEvent = new MockEvent1<ITable>();
|
||||
/** */
|
||||
public MockEvent3<IHand, ITable, ITable> turnEndEvent = new MockEvent3<IHand, ITable, ITable>();
|
||||
public MockEvent2<IRoundState, InvalidTurnInfo> turnEndEvent = new MockEvent2<IRoundState, InvalidTurnInfo>();
|
||||
/** */
|
||||
public MockEvent1<IRoundState> turnStartEvent = new MockEvent1<IRoundState>();
|
||||
public MockEvent turnStartEvent = new MockEvent();
|
||||
/** */
|
||||
public GameData currentGame;
|
||||
/** */
|
||||
|
@ -140,12 +138,12 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IEvent3<IHand, ITable, ITable> getTurnEndEvent() {
|
||||
public IEvent2<IRoundState, InvalidTurnInfo> getTurnEndEvent() {
|
||||
return turnEndEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent1<IRoundState> getTurnStartEvent() {
|
||||
public IEvent getTurnStartEvent() {
|
||||
return turnStartEvent;
|
||||
}
|
||||
|
||||
|
@ -205,12 +203,12 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void endTurn(IHand oldHand, ITable oldTable, ITable newTable) {
|
||||
public void endTurn(IRoundState state, InvalidTurnInfo invalidTurnInfo) {
|
||||
turnEnded = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startTurn(IRoundState state) {
|
||||
public void startTurn() {
|
||||
turnStarted = true;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue