diff --git a/src/Game.java b/src/Game.java index 6e61910..2e1a580 100644 --- a/src/Game.java +++ b/src/Game.java @@ -1,7 +1,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.Font; import java.awt.Point; import java.awt.event.KeyEvent; @@ -19,7 +18,6 @@ import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.Border; public class Game { @@ -51,10 +49,8 @@ static int[] deckCounter; static ArrayList trash; static Player[] players; - static JPanel[] playersUI; static int currentPlayer; static boolean won; - static boolean moveFinished; static int selectedPlayer; static int selectedCards; @@ -65,6 +61,12 @@ //UI STUFF JFrame mainFrame; + JPanel gamePanel; + JPanel hintPanel; + JPanel thunderPanel; + JLabel[] hintUI; + JLabel[] thunderUI; + static JPanel[] playersUI; public static void main(String[] args) { @@ -91,7 +93,6 @@ } private void resetMoveValues(){ - moveFinished = false; selectedPlayer = -1; chosenColor = -1; chosenValue = -1; @@ -131,8 +132,22 @@ } } - private void createUI(){try { - UIManager.setLookAndFeel( "javax.swing.plaf.nimbus.NimbusLookAndFeel" ); + private boolean checkValidMove(){ + int countCards = 0; + for(int i=0; i 0); + } + private Point randomPosition(){ Point p = new Point(); p.x = random(5);