BackgammonPanel() {
            game = new BackgammonGame();
            currState = game.getInitialState();
            setLayout(new BorderLayout());
            setBackground(Color.BLUE);

            //add top toolbar
            JToolBar toolBar = new JToolBar();
            toolBar.setFloatable(false);
            
            timeCombo = new JComboBox(new String[] { "0.2 sec", "1 sec", "5 sec", "25 sec" });
            toolBar.add(timeCombo);
            timeCombo.setMaximumSize(new Dimension(100,30));
            
            metrics = new JComboBox();
            toolBar.add(metrics);
            metrics.setPreferredSize(new Dimension(1,1));

            clearButton = new JButton("Reset");
            clearButton.addActionListener(this);
            toolBar.add(clearButton);
            
            proposeButton = new JButton("Propose Move");
            proposeButton.addActionListener(this);
            toolBar.add(proposeButton);
            
            add(toolBar, BorderLayout.NORTH);

            JPanel boardPanel = new JPanel();
            boardPanel.setLayout(new GridLayout(2, 15, 5, 5));
            boardPanel.setBorder(BorderFactory.createEtchedBorder());
            boardPanel.setBackground(Color.GREEN);
            for (int i = 13; i < 26; i++) { //add board tiles (first row)
                GridElement element = new GridElement(i);
                boardPanel.add(element);
                element.addActionListener(this);
                if (i == 18 || i == 24){
                    JButton fakeButton = new JButton();
                    fakeButton.setBackground(Color.BLACK);
                    boardPanel.add(fakeButton);
                }
            }
            for (int i = 12; i >= 0; i--) { //add board tiles (2nd row)
                GridElement element = new GridElement(i);
                boardPanel.add(element);
                element.addActionListener(this);
                if (i == 7 || i == 1){
                    JButton fakeButton = new JButton();
                    fakeButton.setBackground(Color.BLACK);
                    boardPanel.add(fakeButton);
                }
            }
            
            add(boardPanel, BorderLayout.CENTER);
            
            //add bottom toolbar
            JPanel dicePanel = new JPanel();
            dicePanel.setLayout(new GridLayout(1, 3, 5, 5));
            dicePanel.setBorder(BorderFactory.createEtchedBorder());
            dicePanel.setBackground(Color.BLUE);
            
            statusBar = new JLabel("");
            statusBar.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            dicePanel.add(statusBar);
            
            for (int i = 0; i < 2; i++) { //add dice tiles
                DieElement element = new DieElement(i);
                dicePanel.add(element);
                element.addActionListener(this);
            }
            
            add(dicePanel, BorderLayout.SOUTH);

            updateStatus();
        }