This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package skeleton; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.JFrame; | |
import javax.swing.SwingUtilities; | |
import javax.swing.JMenu; | |
import javax.swing.JMenuBar; | |
import javax.swing.JMenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package skeleton; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.Color; | |
import java.io.IOException; | |
import javax.swing.JFrame; | |
import javax.swing.JTextField; | |
import javax.swing.SwingUtilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JMenuItem Exit = new JMenuItem("Exit"); | |
Exit.setToolTipText("Exit application"); | |
Exit.addActionListener(new ActionListener() { | |
public void actionPerformed(ActionEvent event) { | |
statusbar.setText("Exiting"); | |
JOptionPane.showConfirmDialog(main, "Are you sure you want to exit?", | |
"Exiting", JOptionPane.YES_NO_OPTION); | |
System.exit(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Class negro { | |
System.out.println("Louie my killa") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class Character { | |
static String name; | |
static int health; | |
static int mana; | |
static int gold; | |
static int xp; | |
static int attack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Example extends JFrame { | |
private static final long serialVersionUID = 1L; | |
protected Component main; | |
public Example() { | |
initUI(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package skeleton; | |
public class ShopNPC { | |
String response1 = "gtfo my face nigga"; | |
// Do like a dozen of these response. | |
//String responsetitle = "what he actually says"; | |
//Name the response whatever you want so that they fit the actual response. | |
//Make sure to include things like "Would you like to view my items?" or "You don't have enough money for that!" | |
//Easter eggs gogogogogo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void CharacterCreate(int ccRace, int ccGender, int ccRole, int qq1, int qq2, int qq3) { | |
if (ccRace == 0 && ccGender == 0 && ccRole == 0) { | |
health = 150; | |
secondBar = "Stamina"; | |
stamina = 100; | |
strength = 30; | |
intelligence = 15; | |
dexterity = 15; | |
charisma = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JMenuItem Load = new JMenuItem("Load Game"); | |
Load.setToolTipText("Load a previously saved game"); | |
Load.addActionListener(new ActionListener() { | |
public void actionPerformed(ActionEvent event) { | |
load.loadGame(); | |
if (Character.secondBar == null) { | |
statusbar.setText("No game found"); | |
} | |
else { | |
statusbar.setText("Loading game..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class save { | |
static int savedQ = 0; | |
public static void gameSave() { | |
try{ // Catch errors in I/O if necessary. | |
// Open a file to write to, named GameData.sav. | |
FileOutputStream saveFile = new FileOutputStream("GameData.sav"); | |
// Create an ObjectOutputStream to put objects into save file. |
OlderNewer