title: Event driven board game and GUI: How to connect?
body: <p>So I've been making board game Funny Bunny (children's game) on Java. I first made it text based but now I've been building a GUI for it using Swing. The trouble is, I've never made a GUI before and tough the GUI itself has been fairly easy to make, I find it incredibly hard to combine my game and the GUI.</p>
  
  <p>I'll first explain the basic idea of the game.</p>
  
  <p>THE GAME</p>
  
  <ul>
  <li>There are 2-4 players and they all have four game pieces.</li>
  <li><p>There's a deck of special card that "run" the game (4 types: move 1, 2 or 3 steps and card for changing the board.</p></li>
  <li><p>One turn consists of player revealing a card</p>
  
  <blockquote>
    <p>If it's a move card, the move a piece
    If it's change the board card, the board changes and holes may open. (Some places on the board aren't safe, game pieces might drop in a hole)</p>
  </blockquote></li>
  </ul>
  
  <p>So, the idea behind the game is fairly simple.</p>
  
  <p><strong>The trouble, I've got no idea how to actually make it work with a GUI.</strong> I tought it'd be rather and started enthuastically building my GUI. I made the game view (I'll add a picture), main menu, number of players menu and all that stuff just to realize that I don't know how to really make it work with event-driven game.</p>
  
  <p><a href="http://i.stack.imgur.com/I3YKd.png" rel="nofollow">Game view, work in progress, never mind the colors</a></p>
  
  <p>I'd like to GUI version work along these lines
   1. First, bunch of menus for setting up the players and stuff. That's okay.
   2. In the game view, player reveals a card by pushing "Show card"
   3. Based on the type of the card enter either stage:
   3.1 Move a game piece. This would happen by clicking a game piece (either button on the side or a piece on the game board) --> This would start move a piece process --> Requires updating the board in the end
  OR
  3.2 Change the board, which would updating the GUI board. <strong>I'm really lost with how to do this.</strong></p>
  
  <p>Should I use something like threads, or Swing Worker or what should I do?
  Do you people want to see some sample code? That'd probably help. Just let me know, and I'll post some (it requires some translating with the comments and stuff and that's why I didn't want just randomly post parts of my code here)</p>
  
  <p>All help, comments, feedback... everything would highly appreciated and really helpful. Did I already mention I'm lost and stuck? I really am.</p>