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

Commit

Permalink
From Martin
Browse files Browse the repository at this point in the history
  • Loading branch information
yichunShen committed Jun 13, 2018
1 parent fbc2e62 commit 18ecc8d
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 20 deletions.
Binary file added A0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added A9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added L.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions achievementList.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Journey of a thousand miles starts with one step|win 1 battle
the Success kid|win 100 battles
Chicken dinner|win 1 battle
Too young, too simple, sometimes naive|win 100 battles
I'm bald, I'm strong|win 1000 battles
Omae wa mou shindeiru|win 2000 battles
Main heroine of Asadora|lose 10 battles
Letter from 1976|lose 100 battles
I have not failed. I've just found 1000 ways that won't work|lose 1000 battles
Never, never, never give up|lose 2000 battles
It's a trap|miss 100 times
Kimochi warui|lose 1000 battles
AAAHHHHH!!! Boku no o no chikara ga!!!!!|lose 2000 battles
Potato aiming|miss 100 times
Do u no dewae|miss 1000 times
Can't touch this|miss 5000 times
Chinese national men’s soccer team|miss 5000 times
______________________________________________________
Somebody toucha my spaghet|fight 10 battles
Dormammu i've come to bargain|fight 100 battles
This is Sparta!|fight 1000 battles
Battleships: Infinity War|fight 2018 battles
SHINJI GET INTO THE ROBOT!!!!!!!|fight 5000 battles
Performance Artist|fight 5000 battles
24|total 24 hours played
El psy congroo|total 2036 hours played
Jinrui Hokan|Complete all other achievements
Expand All @@ -26,3 +26,6 @@ Senpai noticed me|one character intimacy achieve 100%
Bad romance|dismantle 10 characters
A snap of fingers|dismantle 50 characters
It's bigger from the inside|expand capacity by 100


_____________________________________________________
Binary file added bkgBasic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bkgBasicBW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bkgBasicBWNoShadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bkgBasicNoShadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 5 additions & 13 deletions src/Achievements.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
/**
*
* @author Martin Xu
*
*/

public class Achievements extends JPanel implements MouseListener{
private final static int num=16;
private final static int num=14;
private static JLabel BackButton=new JLabel();
private static JScrollPane scrollPane = new JScrollPane();
private static JPanel paneContent=new JPanel();
Expand All @@ -19,7 +15,6 @@ public class Achievements extends JPanel implements MouseListener{
"Too young, too simple, sometimes naive",
"I'm bald, I'm strong",
"Omae wa mou shindeiru",
"Main heroine of Asadora",
"Letter from 1976",
"Kimochi warui",
"AAAHHHHH!!! Boku no o no chikara ga!!!!!",
Expand All @@ -31,14 +26,12 @@ public class Achievements extends JPanel implements MouseListener{
"Performance Artist",
"24",
"El psy congroo",
"Jinrui Hokan"
};

private static final String[]reqirements=new String[] {
"win 100 battles",
"win 1000 battles",
"win 2000 battles",
"lose 10 battles",
"lose 100 battles",
"lose 1000 battles",
"lose 2000 battles",
Expand All @@ -50,7 +43,6 @@ public class Achievements extends JPanel implements MouseListener{
"fight 5000 battles",
"total 24 hours played",
"total 2036 hours played",
"Complete all other achievements"
};

Insets bInsets;
Expand All @@ -61,7 +53,7 @@ public Achievements() {
bInsets=getInsets();
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBounds(bInsets.left+150,bInsets.top+20,1300,700);
scrollPane.setBounds(bInsets.left+150,bInsets.top+20,1250,650);
scrollPane.getViewport().setOpaque(false);
scrollPane.setOpaque(false);
makeLabel();
Expand All @@ -76,9 +68,9 @@ public static void makeLabel() {
paneContent.setLayout(new BoxLayout(paneContent,BoxLayout.Y_AXIS));
for(int i=0;i<num;i++) {
if(accomplished[i]) {
achievementsNoShadow[i]=new JLabel(new ImageIcon("bkgBasicNoShadow.png"));
achievementsNoShadow[i]=new JLabel(new ImageIcon("A"+i+".png"));
}else {
achievementsNoShadow[i]=new JLabel(new ImageIcon("bkgBasicBWNoShadow.png"));
achievementsNoShadow[i]=new JLabel(new ImageIcon("L.png"));
}
paneContent.add(achievementsNoShadow[i]);
}
Expand Down
44 changes: 44 additions & 0 deletions src/achGUI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;

public class achGUI extends JFrame implements ActionListener{
private JMenuBar menuBar = new JMenuBar();
private JPanel seaEnemy = new JPanel();
private JPanel seaFriendly = new JPanel();
private JPanel LeftInfoBar = new JPanel();
private JPanel RigtInfoBar = new JPanel();
private final int sideLength=10;

public achGUI(){
setSize(1200,800);
setTitle("Battleship!");
setJMenuBar(menuBar);
setLayout(new FlowLayout());
menuBar.setVisible(true);
setVisible(true);
}

public void InitializeGrid() {
add(seaFriendly);
add(seaEnemy);
}

public void InitializeLeftBar() {
add(LeftInfoBar);
}

public void InitializeRigtBar() {
add(RigtInfoBar);
}

public void actionPerformed(ActionEvent e) {

}

public static void main(String[] args) {
achGUI c=new achGUI();

}

}

0 comments on commit 18ecc8d

Please sign in to comment.