public EventsGUI(MainGUI mainGUIObject) {
		
		
	mainGUI = mainGUIObject;
	game = mainGUI.getGame();
	resources = game.getResources();
	message = new MessageGUI();
	refreshNumber = 0;
	possible = true;
		
		setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
		getContentPane().setLayout(null);
		getContentPane().setBackground(new java.awt.Color(9, 81, 0));
		setResizable(false);
		this.setSize(1103, 658);
		setTitle("Events");

			homeImage = new ImageIcon(getClass().getResource("img/buttons/homeButton.png"));
			homeButton = new JButton(homeImage);
			getContentPane().add(homeButton);
			homeButton.setBounds(7, 19, 136, 37);
			homeButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent evt) {
					
					mainGUI.setEnabled(true);
					mainGUI.updateDisplay();
					
					dispose();
				}
			});
		
		
		
			steel = new JLabel();
			getContentPane().add(steel);
			steel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/main/verySmall/steel.png")));
			steel.setBounds(12, 466, 123, 98);
			// steel text field
			steelT = new JTextField();
			getContentPane().add(steelT);
			steelT.setText("0");
			steelT.setBounds(24, 576, 95, 22);
			steelT.setEditable(false);
			steelT.setFont(new java.awt.Font("Segoe UI",0,14));

			gold = new JLabel();
			getContentPane().add(gold);
			gold.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/main/verySmall/gold.png")));
			gold.setBounds(12, 331, 123, 98);
			// gold text field
			goldT = new JTextField();
			getContentPane().add(goldT);
			goldT.setText("0");
			goldT.setBounds(24, 438, 95, 22);
			goldT.setEditable(false);
			goldT.setFont(new java.awt.Font("Segoe UI",0,14));

			stone = new JLabel();
			getContentPane().add(stone);
			stone.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/main/verySmall/stone.png")));
			stone.setBounds(20, 193, 123, 98);
			// stone text field
			stoneT = new JTextField();
			getContentPane().add(stoneT);
			stoneT.setText("0");
			stoneT.setBounds(32, 165, 95, 22);
			stoneT.setEditable(false);
			stoneT.setFont(new java.awt.Font("Segoe UI",0,14));

			wood = new JLabel();
			getContentPane().add(wood);
			wood.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/main/verySmall/wood.png")));
			wood.setBounds(20, 61, 123, 98);
			// wood text field
		    woodT = new JTextField();
			getContentPane().add(woodT);
			woodT.setText("0");
			woodT.setBounds(32, 303, 95, 22);
			woodT.setEditable(false);
			woodT.setFont(new java.awt.Font("Segoe UI",0,14));
			
			{
				veryEasyDescriptionTF = new JTextArea();
				JScrollPane scrollPane = new JScrollPane(veryEasyDescriptionTF); 
				veryEasyDescriptionTF.setEditable(false);
				veryEasyDescriptionTF.setLineWrap(true);
				getContentPane().add(veryEasyDescriptionTF);
				veryEasyDescriptionTF.setText("Very Easy");
				veryEasyDescriptionTF.setBounds(184, 251, 229, 71);
			}
			{
				easyDescriptionTF = new JTextArea();
				JScrollPane scrollPane = new JScrollPane(easyDescriptionTF); 
				easyDescriptionTF.setEditable(false);
				easyDescriptionTF.setLineWrap(true);
				getContentPane().add(easyDescriptionTF);
				easyDescriptionTF.setText("easy");
				easyDescriptionTF.setBounds(431, 251, 229, 71);
			}
			{
				mediumDescriptionTF = new JTextArea();
				JScrollPane scrollPane = new JScrollPane(mediumDescriptionTF); 
				mediumDescriptionTF.setEditable(false);
				mediumDescriptionTF.setLineWrap(true);
				getContentPane().add(mediumDescriptionTF);
				mediumDescriptionTF.setText("medium");
				mediumDescriptionTF.setBounds(688, 251, 224, 71);
			}
			{
				hard1DescriptionTF = new JTextArea();
				JScrollPane scrollPane = new JScrollPane(hard1DescriptionTF); 
				hard1DescriptionTF.setEditable(false);
				hard1DescriptionTF.setLineWrap(true);
				getContentPane().add(hard1DescriptionTF);
				hard1DescriptionTF.setText("hard1");
				hard1DescriptionTF.setBounds(268, 525, 229, 80);
			}
			{
				hard2DescriptionTF = new JTextArea();
				JScrollPane scrollPane = new JScrollPane(hard2DescriptionTF); 
				hard2DescriptionTF.setEditable(false);
				hard2DescriptionTF.setLineWrap(true);
				getContentPane().add(hard2DescriptionTF);
				hard2DescriptionTF.setText("hard2");
				hard2DescriptionTF.setBounds(554, 525, 224, 80);
			}
			
			 VeryEasyButton = new JButton(VeryEasyImage);
		        getContentPane().add(VeryEasyButton);
				VeryEasyButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/events/big/veryEasy.png")));
		        VeryEasyButton.setBounds(184, 54, 229, 185);    
		        VeryEasyButton.addActionListener(new ActionListener() {
		        	public void actionPerformed(ActionEvent evt) {
		        		System.out.println("VeryEasyButton.actionPerformed, event="+evt);
		        		//TODO add your code for VeryEasyButton.actionPerformed
		        		
		        		
		        		game.getEvents().startEvent(game.getEvents().getFirst());
		        		updateDisplay();
		        		if(game.getEvents().getisSuccesful()==true){
		        		game.getEvents().refresh();
		        		updateDescription();
		        		resetRefreshNumber();
		        		}
		        		
		        	}
		        });
		        
		        
		        easyButton = new JButton(easyImage);
		        getContentPane().add(easyButton);
				easyButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/events/big/easy.png")));
		        easyButton.setBounds(431, 54, 229, 185);
		        easyButton.addActionListener(new ActionListener() {
		        	public void actionPerformed(ActionEvent evt) {
		        		System.out.println("easyButton.actionPerformed, event="+evt);
		        		//TODO add your code for easyButton.actionPerformed
		        		game.getEvents().startEvent(game.getEvents().getSecond());
		        		updateDisplay();
		        		if(game.getEvents().getisSuccesful()==true){
			        		game.getEvents().refresh();
			        		updateDescription();
			        		resetRefreshNumber();
			        		}
		        	}
		        });

		        

		        mediumButton = new JButton(mediumImage);
		        getContentPane().add(mediumButton);
				mediumButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/events/big/medium.png")));
		        mediumButton.setBounds(688, 54, 229, 185);
		        mediumButton.addActionListener(new ActionListener() {
		        	public void actionPerformed(ActionEvent evt) {
		        		System.out.println("mediumButton.actionPerformed, event="+evt);
		        		//TODO add your code for mediumButton.actionPerformed
		        		game.getEvents().startEvent(game.getEvents().getThird());
		        		updateDisplay();
		        		if(game.getEvents().getisSuccesful()==true){
			        		game.getEvents().refresh();
			        		updateDescription();
			        		resetRefreshNumber();
			        		}
		        	}
		        });

		        hardButton = new JButton(hardImage);
		        getContentPane().add(hardButton);
				hardButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/events/big/hard.png")));
		        hardButton.setBounds(268, 328, 229, 185);
		        hardButton.addActionListener(new ActionListener() {
		        	public void actionPerformed(ActionEvent evt) {
		        		System.out.println("hardButton.actionPerformed, event="+evt);
		        		//TODO add your code for hardButton.actionPerformed
		        		game.getEvents().startEvent(game.getEvents().getFourth());
		        		updateDisplay();
		        		if(game.getEvents().getisSuccesful()==true){
			        		game.getEvents().refresh();
			        		updateDescription();
			        		resetRefreshNumber();
			        		}
		        	}
		        });

		        veryHardButton = new JButton(veryHardImage);
		        getContentPane().add(veryHardButton);
				veryHardButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("img/events/big/veryHard.png")));
		        veryHardButton.setBounds(554, 328, 229, 185);
		        veryHardButton.addActionListener(new ActionListener() {
		        	public void actionPerformed(ActionEvent evt) {
		        		System.out.println("veryHardButton.actionPerformed, event="+evt);
		        		//TODO add your code for veryHardButton.actionPerformed
		        		game.getEvents().startEvent(game.getEvents().getFifth());
		        		updateDisplay();
		        		if(game.getEvents().getisSuccesful()==true){
			        		game.getEvents().refresh();
			        		updateDescription();
			        		resetRefreshNumber();
			        		}
		        	}
		        });

				refresh = new JButton();
				getContentPane().add(refresh);
				refresh.setText("refresh");
				refresh.setBounds(813, 377, 84, 74);
				refresh.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("refresh.actionPerformed, event="+evt);
						//TODO add your code for refresh.actionPerformed
						if(refreshNumber <3){
						game.getEvents().refresh();
						updateDescription();
						refreshNumber ++;}
						else if(isPossibleToStart() == true){
							message.sendMessage("You have reached 3 refreshes");
						}
						else{
							message.sendMessage("You have reached 3 refreshes and there are no events you can do. Game over!");
						}
					}
				});
				
				
}