Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Commit

Permalink
AI goes first does work, AI's shoot is displayed after user's first move
Browse files Browse the repository at this point in the history
  • Loading branch information
yichunShen committed Jun 13, 2018
1 parent ea22a85 commit 48cfff2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Binary file added futureFeatures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/base.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class base extends JPanel{
JLabel profileButton = new JLabel(new ImageIcon("mProfileButton.png"));
JLabel contractPane = new JLabel(new ImageIcon("mContractPane.png"));
JLabel contractPaneButton = new JLabel(new ImageIcon("mContractPaneButton.png"));
JLabel futurePost = new JLabel(new ImageIcon("futureFeatures.png"));
int initXCoordinate=700;
int[] initYCoordinates = {30,50};
ArrayList<JLabel> mRightButtons = new ArrayList<JLabel>();
Expand Down Expand Up @@ -110,6 +111,10 @@ public base(){
contractPane.addMouseListener(mMousListButtons);
add(contractPane);
add(profileButton);
futurePost.setBounds(bInsets.left,bInsets.top,650,700);
add(futurePost);
futurePost.setVisible(false);
futurePost.addMouseListener(game.returnEnd);
add(bgi);
setVisible(true);

Expand Down
3 changes: 2 additions & 1 deletion src/game.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class game extends JPanel{
JLabel[] mapLabels = new JLabel[40];
ArrayList<JLabel> gButtons = new ArrayList<JLabel>();
ArrayList<JLabel> buttonEffects = new ArrayList<JLabel>();
MouseListener returnEnd = new MouseListener(){
static MouseListener returnEnd = new MouseListener(){
public void mouseClicked(MouseEvent arg0) {
((JLabel)arg0.getSource()).setVisible(false);
}
Expand Down Expand Up @@ -218,6 +218,7 @@ public void actionPerformed(ActionEvent e) {
add(userBoard);
enemBoard.setBounds(bInsets.left+750,bInsets.top,400,125);
add(enemBoard);

bgi.setBounds(bInsets.left,bInsets.top,1300,700);
add(bgi);
setBackground(Color.DARK_GRAY);
Expand Down

0 comments on commit 48cfff2

Please sign in to comment.