Jump to content

Wayne Geissinger

Member
  • Posts

    104
  • Joined

  • Last visited

Awards

This user doesn't have any awards

About Wayne Geissinger

  • Birthday Apr 20, 1999

Profile Information

  • Gender
    Male

System

  • CPU
    Core i7 9700k
  • Motherboard
    ASUS PRIME Z370-A
  • RAM
    32GB HyperX Fury 3200MHz
  • GPU
    RTX 2070 Super (White Windforce Edition)
  • Case
    NZXT S340 Elite (White)
  • Storage
    500GB Samsung 970 EVO (NVME) + 500GB Samsung 960 Pro + 4TB Seagate Barracuda
  • PSU
    Corsair CX 850
  • Display(s)
    LG 1440p 144Hz Freesync
  • Cooling
    NZXT Kraken X52
  • Keyboard
    Corsair K70 LUX
  • Mouse
    Corsair Schimtar (Black Edition)
  • Sound
    Logitech Z313
  • Operating System
    Windows 10 Pro

Recent Profile Visitors

1,005 profile views

Wayne Geissinger's Achievements

  1. Physical mounting. Involving double-sided tape and some bad mounting angles. It's a mess because the 7020 case can only hold three drives in bays.
  2. I currently have an optiplex 7020 (not SFF) with an i5-4670 and 32 GB of memory (running FreeNAS) that I love, except when trying to throw in 5 2TB Seagate enterprise drives for a quick RAID array. I've had to use some pretty sketchy means to mount the drives, and I don't like it one bit. Does anyone know of an enclosure that I could use that would fit a 7020 motherboard and 5+ drives? I'm not sure if it's ATX or some Dell proprietary standard. I am also looking for a FreeNAS compatible SATA controller so that I can use all 5 of my drives, because as it sits I only have four ports, one of which appears to be dead. I'm pretty new to working with FreeNAS, so the more plug-and-play the better honestly.
  3. Hi guys! OG user from forever ago who posted like once and disappeared. I'm doing a board repair for a guy whose graphics card had a little bit of a fire issue. I do component level repairs every now and again, but a trace blew pretty well and managed to mangle an area well enough that I can't quite tell what goes where. It's a GTX 970 (I know, he should just trash it) but he's pretty strapped for cash and I'm just trying to help a brother out. Does anyone know where I might be able to find some high resolution GPU board photos, or would anyone happen to have a GTX 970 SSC ACX 2.0? The revision number (on the tail of the PCIE connector) is EVGA142 1.2 It's a bit of a stretch asking, but I can't find any good photos by googling. I'm pretty sure it's not a reference PCB, because there are a couple caps and chokes that aren't in the right place. Thanks! :D
  4. I can choose from die1.gif to die6.gif, but die6.gif is already selected and is the one I want to use.
  5. I found it, but it's unchangeable because of the IDE I'm using.
  6. Yes it is. I can get the main jframe to display if I change line 40 in the DieLabel class to /Images/die instead of /images/die, but it doesn't show the dice.
  7. Here you go. Within the source packages, have the package "Images" and put the die gifs directly in there. http://filebin.ca/3E18J7BbvqCz
  8. OH! The gifs are in the images package within the source packages folder. I never sent them through.
  9. sorry, Im fairly new to this. Where do I do that?
  10. I guess my problem is too complicated to ask for help on forums
  11. I guess my problem is too complicated to ask for help on forums
  12. So, I am creating a project for my programming class. The game is called Pig. The object of the game is to roll dice, and take the total of both dice and add them to your score. The first person to reach 100 wins. If you roll a 1, you lose your score for that turn and you lose your turn. If you roll snake eyes, you lose your score for the entire game up to that point and you lose your turn. We were given a class which contained the necessary code to have animated dice that flashed random gifs of dice until it finally "lands" on the correct number. My program works entirely, but the problem is that the project isn't building properly. Once I get past the two prompts at the beginning for playernames, the program stops cold. Doesn't even open my main JFrame. I am using NetBeans IDE. Here are my classes: Jframe that contains UI: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package rollem; import java.awt.Color; import javax.swing.JOptionPane; /** * * @author wayne */ public class GameJFrame extends javax.swing.JFrame { private int diceTotal = 12; private final int NUMBER_OF_DICE = 2; private int turn = 1; private int p1Wins = 0; private int p2Wins = 0; private DieLabel[] myDiceSet = new DieLabel[ NUMBER_OF_DICE + 1 ]; Player P1 = new Player(); Player P2 = new Player(); String player1Name = JOptionPane.showInputDialog(this, "Player 1's Name:"); String player2Name = JOptionPane.showInputDialog(this, "Player 2's Name:"); /** * Creates new form GameJFrame */ public GameJFrame() { initComponents(); P1NameLabel.setText(player1Name); P2NameLabel.setText(player2Name); myDiceSet[1] = dieLabel1; myDiceSet[2] = dieLabel2; //initial player text color set to blue P1NameLabel.setForeground(Color.blue); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { P2WinLabel = new javax.swing.JLabel(); P1WinLabel = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); P1NameLabel = new javax.swing.JLabel(); P2NameLabel = new javax.swing.JLabel(); CurrentRollLabel = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); P1GameScoreLabel = new javax.swing.JLabel(); P2TurnScoreLabel = new javax.swing.JLabel(); P2GameScoreLabel = new javax.swing.JLabel(); P1TurnScoreLabel = new javax.swing.JLabel(); RollButton = new javax.swing.JButton(); StopButton = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); dieLabel1 = new rollem.DieLabel(); dieLabel2 = new rollem.DieLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMaximumSize(new java.awt.Dimension(1108, 800)); setPreferredSize(new java.awt.Dimension(1108, 800)); P2WinLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P2WinLabel.setText("0"); P1WinLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P1WinLabel.setText("0"); jLabel7.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel7.setText("Wins:"); jLabel6.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel6.setText("Wins:"); P1NameLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P1NameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); P1NameLabel.setText("Player 1 Name"); P2NameLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P2NameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); P2NameLabel.setText("Player 2 Name"); CurrentRollLabel.setText("Current Roll: 12"); jLabel1.setFont(new java.awt.Font("Dialog", 1, 36)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Roll 'Em Pigs!"); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jLabel2.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel2.setText("Turn Score:"); jLabel3.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel3.setText("Game Score:"); jLabel4.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel4.setText("Game Score:"); jLabel5.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N jLabel5.setText("Turn Score:"); P1GameScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P1GameScoreLabel.setText("0"); P2TurnScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P2TurnScoreLabel.setText("0"); P2GameScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P2GameScoreLabel.setText("0"); P1TurnScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N P1TurnScoreLabel.setText("0"); RollButton.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N RollButton.setText("Roll"); RollButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RollButtonActionPerformed(evt); } }); StopButton.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N StopButton.setText("Stop"); StopButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { StopButtonActionPerformed(evt); } }); jPanel1.setLayout(new java.awt.GridLayout(1, 2)); jPanel1.add(dieLabel1); jPanel1.add(dieLabel2); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(63, 63, 63) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(P1NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(P1GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1WinLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(14, 14, 14))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(RollButton, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(61, 61, 61) .addComponent(StopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(65, 65, 65) .addComponent(P2NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(444, 444, 444) .addComponent(jLabel5) .addGap(24, 24, 24)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(149, 149, 149) .addComponent(CurrentRollLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(P2TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P2GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P2WinLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGroup(layout.createSequentialGroup() .addGap(270, 270, 270) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 518, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(63, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(50, 50, 50) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(CurrentRollLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(RollButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(StopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(P2NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P2TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P2GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(P2WinLabel))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(P1WinLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(89, Short.MAX_VALUE)))) ); pack(); }// </editor-fold> private void RollButtonActionPerformed(java.awt.event.ActionEvent evt) { if (turn == 1) { CurrentRollLabel.setText("Current Roll: " + P1.rollDie(myDiceSet[1], myDiceSet[2])); P1TurnScoreLabel.setText(P1.getTurnScore() + ""); if (P1.isTurnScoreLost()) { turn = 2; P1NameLabel.setForeground(Color.black); P2NameLabel.setForeground(Color.blue); return; } } if (turn == 2) { CurrentRollLabel.setText("Current Roll: " + P2.rollDie(myDiceSet[1], myDiceSet[2]) + ""); P2TurnScoreLabel.setText(P2.getTurnScore() + ""); if (P2.isTurnScoreLost()) { turn = 1; P1NameLabel.setForeground(Color.blue); P2NameLabel.setForeground(Color.black); } } } private void StopButtonActionPerformed(java.awt.event.ActionEvent evt) { if (turn == 1) { if (P1.addTurnScoreToGameScore()) { if (P1.hasWon()) { int temp = JOptionPane.showConfirmDialog(this, player1Name + " wins! Play again?"); if (temp == JOptionPane.NO_OPTION) { System.exit(1); } else { P1.reset(); P2.reset(); P1TurnScoreLabel.setText(P1.getTurnScore() + ""); P2TurnScoreLabel.setText(P2.getTurnScore() + ""); P1GameScoreLabel.setText(P1.getGameScore() + ""); P2GameScoreLabel.setText(P2.getGameScore() + ""); turn = 2; p1Wins++; P1WinLabel.setText(p1Wins + ""); } return; } turn = 2; P1NameLabel.setForeground(Color.black); P2NameLabel.setForeground(Color.blue); CurrentRollLabel.setText("Current Roll: "); P1TurnScoreLabel.setText(""); P1GameScoreLabel.setText(P1.getGameScore() + ""); return; } } if (turn == 2) { if (P2.addTurnScoreToGameScore()) { if (P2.hasWon()) { int temp = JOptionPane.showConfirmDialog(this, player2Name + " wins! Play again?"); if (temp == JOptionPane.NO_OPTION) { System.exit(1); } else { P1.reset(); P2.reset(); P1TurnScoreLabel.setText(P1.getTurnScore() + ""); P2TurnScoreLabel.setText(P2.getTurnScore() + ""); P1GameScoreLabel.setText(P1.getGameScore() + ""); P2GameScoreLabel.setText(P2.getGameScore() + ""); turn = 1; p2Wins++; P2WinLabel.setText(p2Wins + ""); } return; } turn = 1; P1NameLabel.setForeground(Color.blue); P2NameLabel.setForeground(Color.black); CurrentRollLabel.setText("Current Roll: "); P2TurnScoreLabel.setText(""); P2GameScoreLabel.setText(P2.getGameScore() + ""); } } } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new GameJFrame().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JLabel CurrentRollLabel; private javax.swing.JLabel P1GameScoreLabel; private javax.swing.JLabel P1NameLabel; private javax.swing.JLabel P1TurnScoreLabel; private javax.swing.JLabel P1WinLabel; private javax.swing.JLabel P2GameScoreLabel; private javax.swing.JLabel P2NameLabel; private javax.swing.JLabel P2TurnScoreLabel; private javax.swing.JLabel P2WinLabel; private javax.swing.JButton RollButton; private javax.swing.JButton StopButton; private rollem.DieLabel dieLabel1; private rollem.DieLabel dieLabel2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JPanel jPanel1; // End of variables declaration } Class that contains Player Info (I have two instantiations in the JFrame) /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package rollem; /** * * @author wayne */ public class Player { private int turnScore = 0; private int gameScore = 0; private int d1; private int d2; void Player() { } int rollDie(DieLabel die1, DieLabel die2) { d1 = die1.rollDie(); d2 = die2.rollDie(); if (isTurnScoreLost()) { if (isGameScoreLost()) return 0; return 0; } turnScore += d1 + d2; return d1 + d2; } boolean isTurnScoreLost() { if (d1 == 1 || d2 == 1) { turnScore = 0; return true; } else return false; } boolean isGameScoreLost() { if (d1 == 1 && d2 == 1) { reset(); return true; } else return false; } boolean hasWon() { if (gameScore > 100 || turnScore > 100) return true; else return false; } boolean addTurnScoreToGameScore() { if (isTurnScoreLost()) return false; if (isGameScoreLost()) return false; gameScore += turnScore; turnScore = 0; return true; } int getTurnScore() { return turnScore; } int getGameScore() { return gameScore; } void reset() { turnScore = 0; gameScore = 0; } } The last class (for the dice) is on pastebin here: http://pastebin.com/x3eKqdYk
  13. I have a programming professor that would like us to write a Tic Tac Toe game a specific way. He wants us to have the "board" class and have specific mutators within to deal with the data and keep as much info in that class as possible. Specifically, He would like us to have a few methods where the only variable passed is an integer that has to do with the location of a variable. for example: public char getMarkAt(int location) //would return the mark at the given location. Would I be able to have an instantiation of my jframe within this class, and have another class which handled all other work? For example: Have a jframe which was simply my nine boxes and a character array (let's say charArray for simplicity) full of a random character (We'll say 0 for the time being) and then get and set marks from the class by creating an instance of the class JFrame1 (named Picture) doing something like JFrame1 Picture = new JFrame1; Picture.charArray[location] = 'X'; Or do I have this all wrong? I have been using JFrames as my main class in the past, and he has thrown in these mandatory passed variables to (I believe) keep us from doing so. Sorry for the craziness!
  14. I WOULD BE SO PISSED. I don't even know who I would blame
  15. that sucks man. I like MSI's customer service from what I hear from other people. I try to stay away from gigabyte because of the notoriously bad CS. If i ever buy a new GPU, ill stray away from my gigabyte one and head for EVGA.
×