package jimmm.test;
import java.awt.GridLayout;
import java.util.ArrayList;
import java.util.Arrays;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import jimmm.data.GameOptions;
import jimmm.data.GameState;
import jimmm.data.Player;
import jimmm.gui.TooSimpleChooser;
import jimmm.gui.TooSimpleDeckRenderer;
import jimmm.gui.TooSimpleHandRenderer;
public class VerySimpleDuel {
public static void main(String[] args) {
Player p1 = new Player("Bob");
Player p2 = new Player("Alice");
JFrame mainFrame = new JFrame("Testduell");
JFrame.setDefaultLookAndFeelDecorated(true);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// mainFrame.setLayout(new BoxLayout(mainFrame, BoxLayout.Y_AXIS));
mainFrame.setLayout(new GridLayout(4, 1));
GameOptions go = new GameOptions();
go.initialCardsPerPlayer = 5;
GameState gs = new GameState( new ArrayList<Player>(Arrays.asList(p1,p2)), go);
TooSimpleHandRenderer h1 = new TooSimpleHandRenderer(p1, gs);
TooSimpleHandRenderer h2 = new TooSimpleHandRenderer(p2,gs);
TooSimpleChooser cr = new TooSimpleChooser(gs);
TooSimpleDeckRenderer dr = new TooSimpleDeckRenderer(gs);
mainFrame.add(h1);
mainFrame.add(h2);
mainFrame.add(cr);
mainFrame.add(dr);
mainFrame.pack();
mainFrame.setVisible(true);
}
}