Saving is working
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@382 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
244abb7e73
commit
8b763a817b
11 changed files with 185 additions and 55 deletions
|
@ -11,6 +11,7 @@ import jrummikub.util.Pair;
|
||||||
/**
|
/**
|
||||||
* Mock class for {@link Hand}
|
* Mock class for {@link Hand}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
public class MockHand implements IHand {
|
public class MockHand implements IHand {
|
||||||
/** */
|
/** */
|
||||||
public List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>();
|
public List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>();
|
||||||
|
|
|
@ -3,6 +3,7 @@ package jrummikub.model;
|
||||||
/**
|
/**
|
||||||
* Mock class for {@link Player}
|
* Mock class for {@link Player}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
public class MockPlayer implements IPlayer {
|
public class MockPlayer implements IPlayer {
|
||||||
/** */
|
/** */
|
||||||
public IHand hand;
|
public IHand hand;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* Mock class for {@link RoundState}
|
* Mock class for {@link RoundState}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
public class MockRoundState implements IRoundState {
|
public class MockRoundState implements IRoundState {
|
||||||
/** */
|
/** */
|
||||||
public MockTable table;
|
public MockTable table;
|
||||||
|
|
|
@ -11,6 +11,7 @@ import jrummikub.util.Pair;
|
||||||
/**
|
/**
|
||||||
* Mock class for {@link Table}
|
* Mock class for {@link Table}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
public class MockTable implements ITable {
|
public class MockTable implements ITable {
|
||||||
/** */
|
/** */
|
||||||
public Map<Stone, StoneSet> findStoneSet = new HashMap<Stone, StoneSet>();
|
public Map<Stone, StoneSet> findStoneSet = new HashMap<Stone, StoneSet>();
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
package jrummikub.view;
|
package jrummikub.view;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.io.File;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import jrummikub.model.Stone;
|
import jrummikub.model.Stone;
|
||||||
import jrummikub.util.IEvent;
|
import jrummikub.util.IEvent;
|
||||||
|
import jrummikub.util.IEvent1;
|
||||||
import jrummikub.util.MockEvent;
|
import jrummikub.util.MockEvent;
|
||||||
|
import jrummikub.util.MockEvent1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mock class for View
|
* Mock class for View
|
||||||
|
@ -41,11 +44,11 @@ public class MockView implements IView {
|
||||||
/** */
|
/** */
|
||||||
public MockEvent menuNewGameEvent = new MockEvent();
|
public MockEvent menuNewGameEvent = new MockEvent();
|
||||||
/** */
|
/** */
|
||||||
public MockEvent menuLoadEvent = new MockEvent();
|
|
||||||
/** */
|
|
||||||
public MockEvent menuSaveEvent = new MockEvent();
|
|
||||||
/** */
|
|
||||||
public MockEvent menuQuitEvent = new MockEvent();
|
public MockEvent menuQuitEvent = new MockEvent();
|
||||||
|
/** */
|
||||||
|
public MockEvent1<File> loadEvent = new MockEvent1<File>();
|
||||||
|
/** */
|
||||||
|
public MockEvent1<File> saveEvent = new MockEvent1<File>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MockTablePanel getTablePanel() {
|
public MockTablePanel getTablePanel() {
|
||||||
|
@ -136,18 +139,18 @@ public class MockView implements IView {
|
||||||
return menuNewGameEvent;
|
return menuNewGameEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IEvent getMenuLoadEvent() {
|
|
||||||
return menuLoadEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IEvent getMenuSaveEvent() {
|
|
||||||
return menuSaveEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getMenuQuitEvent() {
|
public IEvent getMenuQuitEvent() {
|
||||||
return menuQuitEvent;
|
return menuQuitEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent1<File> getLoadEvent() {
|
||||||
|
return loadEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent1<File> getSaveEvent() {
|
||||||
|
return saveEvent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import jrummikub.view.IView.BottomPanelType;
|
||||||
* game control
|
* game control
|
||||||
*/
|
*/
|
||||||
public class ApplicationControl {
|
public class ApplicationControl {
|
||||||
|
private SaveControl saveControl;
|
||||||
private IView view;
|
private IView view;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,6 +22,7 @@ public class ApplicationControl {
|
||||||
*/
|
*/
|
||||||
public ApplicationControl(IView view) {
|
public ApplicationControl(IView view) {
|
||||||
this.view = view;
|
this.view = view;
|
||||||
|
saveControl = new SaveControl(view);
|
||||||
|
|
||||||
view.getMenuQuitEvent().add(new IListener() {
|
view.getMenuQuitEvent().add(new IListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,11 +40,13 @@ public class ApplicationControl {
|
||||||
view.setBottomPanel(BottomPanelType.START_GAME_PANEL);
|
view.setBottomPanel(BottomPanelType.START_GAME_PANEL);
|
||||||
SettingsControl settingsControl = new SettingsControl(view,
|
SettingsControl settingsControl = new SettingsControl(view,
|
||||||
new GameSettings());
|
new GameSettings());
|
||||||
settingsControl.getStartGameEvent().add(new IListener1<GameSettings>() {
|
|
||||||
|
|
||||||
|
settingsControl.getStartGameEvent().add(new IListener1<GameSettings>() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(GameSettings settings) {
|
public void handle(GameSettings settings) {
|
||||||
GameControl gameControl = new GameControl(settings, view);
|
saveControl.setGameSettings(settings);
|
||||||
|
|
||||||
|
GameControl gameControl = new GameControl(settings, saveControl, view);
|
||||||
gameControl.getEndOfGameEvent().add(new IListener() {
|
gameControl.getEndOfGameEvent().add(new IListener() {
|
||||||
@Override
|
@Override
|
||||||
public void handle() {
|
public void handle() {
|
||||||
|
@ -55,5 +59,4 @@ public class ApplicationControl {
|
||||||
});
|
});
|
||||||
settingsControl.startSettings();
|
settingsControl.startSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ import jrummikub.view.IView.BottomPanelType;
|
||||||
* Controls a Game, at some point including all Rounds, starts new Rounds
|
* Controls a Game, at some point including all Rounds, starts new Rounds
|
||||||
*/
|
*/
|
||||||
public class GameControl {
|
public class GameControl {
|
||||||
|
private SaveControl saveControl;
|
||||||
|
|
||||||
private GameSettings gameSettings;
|
private GameSettings gameSettings;
|
||||||
private IView view;
|
private IView view;
|
||||||
RoundControl roundControl;
|
RoundControl roundControl;
|
||||||
|
@ -31,15 +33,21 @@ public class GameControl {
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param gameSettings
|
* @param gameSettings
|
||||||
* the game settings
|
* the game settings
|
||||||
|
* @param saveControl
|
||||||
|
* the save control
|
||||||
* @param view
|
* @param view
|
||||||
* the view
|
* the view
|
||||||
*/
|
*/
|
||||||
public GameControl(GameSettings gameSettings, IView view) {
|
public GameControl(GameSettings gameSettings, SaveControl saveControl,
|
||||||
|
IView view) {
|
||||||
this.gameSettings = gameSettings;
|
this.gameSettings = gameSettings;
|
||||||
|
this.saveControl = saveControl;
|
||||||
this.view = view;
|
this.view = view;
|
||||||
|
|
||||||
gameState = new GameState();
|
gameState = new GameState();
|
||||||
|
saveControl.setGameState(gameState);
|
||||||
|
|
||||||
gameState.setFirstRoundFirstPlayer((int) (Math.random() * gameSettings
|
gameState.setFirstRoundFirstPlayer((int) (Math.random() * gameSettings
|
||||||
.getPlayerList().size()));
|
.getPlayerList().size()));
|
||||||
|
|
||||||
|
@ -96,6 +104,7 @@ public class GameControl {
|
||||||
view.showScorePanel(false);
|
view.showScorePanel(false);
|
||||||
|
|
||||||
IRoundState roundState = new RoundState(gameSettings);
|
IRoundState roundState = new RoundState(gameSettings);
|
||||||
|
saveControl.setRoundState(roundState);
|
||||||
|
|
||||||
roundState.setActivePlayerNumber(gameState.getFirstRoundFirstPlayer()
|
roundState.setActivePlayerNumber(gameState.getFirstRoundFirstPlayer()
|
||||||
+ gameState.getScores().size());
|
+ gameState.getScores().size());
|
||||||
|
@ -133,8 +142,7 @@ public class GameControl {
|
||||||
|
|
||||||
view.getScorePanel().setPlayers(gameSettings.getPlayerList());
|
view.getScorePanel().setPlayers(gameSettings.getPlayerList());
|
||||||
view.getScorePanel().setScores(gameState.getScores());
|
view.getScorePanel().setScores(gameState.getScores());
|
||||||
view.getScorePanel().setAccumulatedScore(
|
view.getScorePanel().setAccumulatedScore(gameState.getAccumulatedScore());
|
||||||
gameState.getAccumulatedScore());
|
|
||||||
view.getScorePanel().update();
|
view.getScorePanel().update();
|
||||||
view.showScorePanel(true);
|
view.showScorePanel(true);
|
||||||
}
|
}
|
||||||
|
|
81
src/jrummikub/control/SaveControl.java
Normal file
81
src/jrummikub/control/SaveControl.java
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
package jrummikub.control;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.ObjectOutputStream;
|
||||||
|
|
||||||
|
import jrummikub.model.GameSettings;
|
||||||
|
import jrummikub.model.GameState;
|
||||||
|
import jrummikub.model.IRoundState;
|
||||||
|
import jrummikub.util.IListener1;
|
||||||
|
import jrummikub.view.IView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The save control is responsible for loading and saving game and round states
|
||||||
|
*/
|
||||||
|
public class SaveControl {
|
||||||
|
private GameSettings gameSettings;
|
||||||
|
private GameState gameState;
|
||||||
|
private IRoundState roundState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new SaveControl
|
||||||
|
*
|
||||||
|
* @param view
|
||||||
|
* the view to use
|
||||||
|
*/
|
||||||
|
public SaveControl(IView view) {
|
||||||
|
view.getSaveEvent().add(new IListener1<File>() {
|
||||||
|
@Override
|
||||||
|
public void handle(File file) {
|
||||||
|
save(file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current game settings
|
||||||
|
*
|
||||||
|
* @param gameSettings
|
||||||
|
* the game settings
|
||||||
|
*/
|
||||||
|
public void setGameSettings(GameSettings gameSettings) {
|
||||||
|
this.gameSettings = gameSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current game state
|
||||||
|
*
|
||||||
|
* @param gameState
|
||||||
|
* the game state
|
||||||
|
*/
|
||||||
|
public void setGameState(GameState gameState) {
|
||||||
|
this.gameState = gameState;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current round state
|
||||||
|
*
|
||||||
|
* @param roundState
|
||||||
|
* the round state
|
||||||
|
*/
|
||||||
|
public void setRoundState(IRoundState roundState) {
|
||||||
|
this.roundState = roundState;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void save(File file) {
|
||||||
|
try {
|
||||||
|
ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(
|
||||||
|
file));
|
||||||
|
|
||||||
|
stream.writeObject(gameSettings);
|
||||||
|
stream.writeObject(gameState);
|
||||||
|
stream.writeObject(roundState);
|
||||||
|
stream.flush();
|
||||||
|
|
||||||
|
stream.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +1,12 @@
|
||||||
package jrummikub.view;
|
package jrummikub.view;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.io.File;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import jrummikub.model.Stone;
|
import jrummikub.model.Stone;
|
||||||
import jrummikub.util.IEvent;
|
import jrummikub.util.IEvent;
|
||||||
|
import jrummikub.util.IEvent1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The top-level view interface
|
* The top-level view interface
|
||||||
|
@ -154,26 +156,25 @@ public interface IView {
|
||||||
public IEvent getMenuNewGameEvent();
|
public IEvent getMenuNewGameEvent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The menu load event is emitted when the user selects the load menu
|
* The menu quit event is emitted when the user selects the quit menu entry
|
||||||
* entry
|
|
||||||
*
|
|
||||||
* @return the event
|
|
||||||
*/
|
|
||||||
public IEvent getMenuLoadEvent();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The menu save event is emitted when the user selects the save menu
|
|
||||||
* entry
|
|
||||||
*
|
|
||||||
* @return the event
|
|
||||||
*/
|
|
||||||
public IEvent getMenuSaveEvent();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The menu quit event is emitted when the user selects the quit menu
|
|
||||||
* entry
|
|
||||||
*
|
*
|
||||||
* @return the event
|
* @return the event
|
||||||
*/
|
*/
|
||||||
public IEvent getMenuQuitEvent();
|
public IEvent getMenuQuitEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The load event is emitted when the user wants to load a previously saved
|
||||||
|
* game state
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
|
IEvent1<File> getLoadEvent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The save event is emitted when the user wants to save the current game
|
||||||
|
* state
|
||||||
|
*
|
||||||
|
* @return the event
|
||||||
|
*/
|
||||||
|
IEvent1<File> getSaveEvent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,13 @@ import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ComponentAdapter;
|
import java.awt.event.ComponentAdapter;
|
||||||
import java.awt.event.ComponentEvent;
|
import java.awt.event.ComponentEvent;
|
||||||
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JLayeredPane;
|
import javax.swing.JLayeredPane;
|
||||||
import javax.swing.JMenu;
|
import javax.swing.JMenu;
|
||||||
|
@ -17,13 +19,16 @@ import javax.swing.JMenuBar;
|
||||||
import javax.swing.JMenuItem;
|
import javax.swing.JMenuItem;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.border.MatteBorder;
|
import javax.swing.border.MatteBorder;
|
||||||
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||||
|
|
||||||
import jrummikub.model.Position;
|
import jrummikub.model.Position;
|
||||||
import jrummikub.model.Stone;
|
import jrummikub.model.Stone;
|
||||||
import jrummikub.model.StoneColor;
|
import jrummikub.model.StoneColor;
|
||||||
import jrummikub.model.StoneSet;
|
import jrummikub.model.StoneSet;
|
||||||
import jrummikub.util.Event;
|
import jrummikub.util.Event;
|
||||||
|
import jrummikub.util.Event1;
|
||||||
import jrummikub.util.IEvent;
|
import jrummikub.util.IEvent;
|
||||||
|
import jrummikub.util.IEvent1;
|
||||||
import jrummikub.util.Pair;
|
import jrummikub.util.Pair;
|
||||||
import jrummikub.view.IHandPanel;
|
import jrummikub.view.IHandPanel;
|
||||||
import jrummikub.view.IPlayerPanel;
|
import jrummikub.view.IPlayerPanel;
|
||||||
|
@ -52,11 +57,14 @@ public class View extends JFrame implements IView {
|
||||||
private SettingsPanel settingsPanel;
|
private SettingsPanel settingsPanel;
|
||||||
private ScorePanel scorePanel;
|
private ScorePanel scorePanel;
|
||||||
|
|
||||||
|
private JFileChooser chooser;
|
||||||
|
|
||||||
private Event menuNewGameEvent = new Event();
|
private Event menuNewGameEvent = new Event();
|
||||||
private Event menuLoadEvent = new Event();
|
|
||||||
private Event menuSaveEvent = new Event();
|
|
||||||
private Event menuQuitEvent = new Event();
|
private Event menuQuitEvent = new Event();
|
||||||
|
|
||||||
|
private Event1<File> loadEvent = new Event1<File>();
|
||||||
|
private Event1<File> saveEvent = new Event1<File>();
|
||||||
|
|
||||||
private static int even(double d) {
|
private static int even(double d) {
|
||||||
return 2 * (int) (d / 2);
|
return 2 * (int) (d / 2);
|
||||||
}
|
}
|
||||||
|
@ -91,21 +99,28 @@ public class View extends JFrame implements IView {
|
||||||
return menuNewGameEvent;
|
return menuNewGameEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IEvent getMenuLoadEvent() {
|
|
||||||
return menuLoadEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IEvent getMenuSaveEvent() {
|
|
||||||
return menuSaveEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getMenuQuitEvent() {
|
public IEvent getMenuQuitEvent() {
|
||||||
return menuQuitEvent;
|
return menuQuitEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent1<File> getLoadEvent() {
|
||||||
|
return loadEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent1<File> getSaveEvent() {
|
||||||
|
return saveEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createFileChooser() {
|
||||||
|
chooser = new JFileChooser();
|
||||||
|
FileNameExtensionFilter filter = new FileNameExtensionFilter(
|
||||||
|
"JRummikub-Spiele", "rum");
|
||||||
|
chooser.setFileFilter(filter);
|
||||||
|
}
|
||||||
|
|
||||||
private void createMenuBar() {
|
private void createMenuBar() {
|
||||||
menuBar = new JMenuBar();
|
menuBar = new JMenuBar();
|
||||||
|
|
||||||
|
@ -127,7 +142,7 @@ public class View extends JFrame implements IView {
|
||||||
loadItem.addActionListener(new ActionListener() {
|
loadItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
menuLoadEvent.emit();
|
load();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
gameMenu.add(loadItem);
|
gameMenu.add(loadItem);
|
||||||
|
@ -135,7 +150,7 @@ public class View extends JFrame implements IView {
|
||||||
saveItem.addActionListener(new ActionListener() {
|
saveItem.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
menuSaveEvent.emit();
|
save();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
gameMenu.add(saveItem);
|
gameMenu.add(saveItem);
|
||||||
|
@ -154,6 +169,20 @@ public class View extends JFrame implements IView {
|
||||||
setJMenuBar(menuBar);
|
setJMenuBar(menuBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void load() {
|
||||||
|
int returnVal = chooser.showOpenDialog(View.this);
|
||||||
|
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||||
|
loadEvent.emit(chooser.getSelectedFile());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void save() {
|
||||||
|
int returnVal = chooser.showSaveDialog(View.this);
|
||||||
|
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||||
|
saveEvent.emit(chooser.getSelectedFile());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new instance of the view
|
* Create a new instance of the view
|
||||||
*/
|
*/
|
||||||
|
@ -164,6 +193,7 @@ public class View extends JFrame implements IView {
|
||||||
setSize(1000, 700);
|
setSize(1000, 700);
|
||||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
createFileChooser();
|
||||||
createMenuBar();
|
createMenuBar();
|
||||||
|
|
||||||
layeredPane = new JLayeredPane();
|
layeredPane = new JLayeredPane();
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class GameControlTest {
|
||||||
new PlayerSettings("Foo", new Color(1.0f, 0, 0)));
|
new PlayerSettings("Foo", new Color(1.0f, 0, 0)));
|
||||||
gameSettings.getPlayerList().add(
|
gameSettings.getPlayerList().add(
|
||||||
new PlayerSettings("Bar", new Color(0, 1.0f, 0)));
|
new PlayerSettings("Bar", new Color(0, 1.0f, 0)));
|
||||||
gameControl = new GameControl(gameSettings, view);
|
gameControl = new GameControl(gameSettings, new SaveControl(view), view);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
|
Reference in a new issue