Version 1.0.1 (2025-01-09): Subtrees angepasst
6
Quellcodes/alg_oo_barbudi/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
6
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
59
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/Barbudi.uml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
[Files]
|
||||
File0=BarbudiGUI.java
|
||||
File1=Spieler.java
|
||||
File2=Spielleitung.java
|
||||
File3=Wuerfel.java
|
||||
File4=WuerfelPanel.java
|
||||
|
||||
[Box: - BarbudiGUI]
|
||||
X=68
|
||||
Y=40
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spieler]
|
||||
X=19
|
||||
Y=573
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=257
|
||||
Y=534
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=538
|
||||
Y=589
|
||||
MinVis=0
|
||||
|
||||
[Box: - WuerfelPanel]
|
||||
X=511
|
||||
Y=183
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=2
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=BarbudiGUI#Spielleitung#Aggregation#1##1#0#0#
|
||||
V1=BarbudiGUI#WuerfelPanel#AggregationArrow#1##1#0#0#
|
||||
V2=Spielleitung#Spieler#AssociationDirected#1##n#0#0#
|
||||
V3=Spielleitung#Wuerfel#Aggregation#1##2#0#0#
|
||||
V4=WuerfelPanel#Wuerfel#AssociationDirected#1##2#0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
[Window]
|
||||
Left=-8
|
||||
Top=-30
|
||||
Width=1936
|
||||
Height=705
|
||||
|
||||
231
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/BarbudiGUI.java
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
/**
|
||||
* GUI fuer das Wuerfelspiel Spielleitung
|
||||
* Zwei Spieler kuennen einen Betrag setzen und dann abwechselnd wuerfeln.
|
||||
* Wuerfelt einer der Spieler einen Gewinnwurf gewinnt er, der andere verliert.
|
||||
* Bei einem Verlustwurf ist es umgekehrt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class BarbudiGUI extends JFrame {
|
||||
// Anfang Attribute
|
||||
private Spielleitung spielleitung; // Verwaltung des Spiels
|
||||
private WuerfelPanel wuerfelPanel1;
|
||||
|
||||
private JPanel jPSpieler1 = new JPanel(null, true);
|
||||
private JLabel jLabel1 = new JLabel();
|
||||
private JLabel jLabel2 = new JLabel();
|
||||
private JNumberField jNFSpieler1Guthaben = new JNumberField();
|
||||
private JLabel jLabel3 = new JLabel();
|
||||
private JNumberField jNFSpieler1Einsatz = new JNumberField();
|
||||
private JButton jBSpieler1Setzen = new JButton();
|
||||
private JPanel jPSpieler2 = new JPanel(null, true);
|
||||
private JLabel jLabel21 = new JLabel();
|
||||
private JNumberField jNFSpieler2Guthaben = new JNumberField();
|
||||
private JLabel jLabel31 = new JLabel();
|
||||
private JNumberField jNFSpieler2Einsatz = new JNumberField();
|
||||
private JButton jBSpieler2Setzen = new JButton();
|
||||
private JLabel jLabel11 = new JLabel();
|
||||
private JLabel jLMeldung = new JLabel();
|
||||
// Ende Attribute
|
||||
|
||||
public BarbudiGUI(String title) {
|
||||
// Frame-Initialisierung
|
||||
super(title);
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
int frameWidth = 653;
|
||||
int frameHeight = 205;
|
||||
setSize(frameWidth, frameHeight);
|
||||
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
int x = (d.width - getSize().width) / 2;
|
||||
int y = (d.height - getSize().height) / 2;
|
||||
setLocation(x, y);
|
||||
setResizable(false);
|
||||
Container cp = getContentPane();
|
||||
cp.setLayout(null);
|
||||
// Anfang Komponenten
|
||||
|
||||
jPSpieler1.setBounds(8, 8, 169, 161);
|
||||
jPSpieler1.setOpaque(true);
|
||||
|
||||
cp.add(jPSpieler1);
|
||||
jLabel1.setBounds(8, 8, 110, 20);
|
||||
jLabel1.setText("Spieler 1");
|
||||
jPSpieler1.add(jLabel1);
|
||||
jLabel2.setBounds(8, 40, 70, 20);
|
||||
jNFSpieler1Guthaben.setBounds(86, 40, 75, 20);
|
||||
jLabel3.setBounds(8, 72, 70, 20);
|
||||
jNFSpieler1Einsatz.setBounds(86, 72, 75, 20);
|
||||
jBSpieler1Setzen.setBounds(48, 120, 75, 25);
|
||||
jLabel2.setText("Guthaben");
|
||||
jPSpieler1.add(jLabel2);
|
||||
jNFSpieler1Guthaben.setText("");
|
||||
jNFSpieler1Guthaben.setEditable(false);
|
||||
jPSpieler1.add(jNFSpieler1Guthaben);
|
||||
jLabel3.setText("Einsatz");
|
||||
jPSpieler1.add(jLabel3);
|
||||
jNFSpieler1Einsatz.setText("");
|
||||
jPSpieler1.add(jNFSpieler1Einsatz);
|
||||
jBSpieler1Setzen.setText("setzen");
|
||||
jBSpieler1Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jBSpieler1Setzen.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
jBSpieler1Setzen_ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPSpieler1.add(jBSpieler1Setzen);
|
||||
jPSpieler2.setBounds(456, 8, 185, 161);
|
||||
jPSpieler2.setOpaque(true);
|
||||
cp.add(jPSpieler2);
|
||||
jLabel21.setBounds(16, 40, 70, 20);
|
||||
jNFSpieler2Guthaben.setBounds(96, 40, 75, 20);
|
||||
jLabel31.setBounds(16, 72, 70, 20);
|
||||
jNFSpieler2Einsatz.setBounds(96, 72, 75, 20);
|
||||
jBSpieler2Setzen.setBounds(64, 120, 75, 25);
|
||||
jLabel21.setText("Guthaben");
|
||||
jPSpieler2.add(jLabel21);
|
||||
jNFSpieler2Guthaben.setText("");
|
||||
jNFSpieler2Guthaben.setEditable(false);
|
||||
jPSpieler2.add(jNFSpieler2Guthaben);
|
||||
jLabel31.setText("Einsatz");
|
||||
jPSpieler2.add(jLabel31);
|
||||
jNFSpieler2Einsatz.setText("");
|
||||
jPSpieler2.add(jNFSpieler2Einsatz);
|
||||
jBSpieler2Setzen.setText("setzen");
|
||||
jBSpieler2Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jBSpieler2Setzen.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
jBSpieler2Setzen_ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPSpieler2.add(jBSpieler2Setzen);
|
||||
jLabel11.setBounds(16, 8, 110, 20);
|
||||
jLabel11.setText("Spieler 2");
|
||||
jPSpieler2.add(jLabel11);
|
||||
jLMeldung.setBounds(184, 144, 262, 28);
|
||||
jLMeldung.setText("Bitte machen Sie Ihre Einsuetze");
|
||||
jLMeldung.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
jLMeldung.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(jLMeldung);
|
||||
// Ende Komponenten
|
||||
|
||||
// Spielleitung Grundaufbau erzeugen (z.B. auch Wuerfel)
|
||||
spielleitung = new Spielleitung();
|
||||
|
||||
wuerfelPanel1= new WuerfelPanel(spielleitung.getWuerfel(0),spielleitung.getWuerfel(1));
|
||||
wuerfelPanel1.setBounds(216, 8, 201, 129);
|
||||
wuerfelPanel1.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent evt) {
|
||||
wuerfelPanel1_MouseClicked(evt);
|
||||
}
|
||||
});
|
||||
cp.add(wuerfelPanel1);
|
||||
|
||||
// Zwei Spieler mit Startguthaben von 100 erzeugen
|
||||
Spieler sp1 = new Spieler(100);
|
||||
Spieler sp2 = new Spieler(100);
|
||||
|
||||
// Spieler bei der Spielleitung anmelden
|
||||
spielleitung.addSpieler(sp1);
|
||||
spielleitung.addSpieler(sp2);
|
||||
|
||||
// Informationen ueber Spieler anzeigen
|
||||
showSpieler();
|
||||
setVisible(true);
|
||||
} // end of public BarbudiGUI
|
||||
|
||||
// Anfang Methoden
|
||||
/** Informationen ueber die Spieler werden angezeigt. Es werden das Guthaben angezeigt
|
||||
* und je nach dem, welche Spieler an der Reihe ist, der Hintergrund dunkler eingefuerbt.
|
||||
* Auueerdem wird angezeigt, welcher Spieler dran ist.
|
||||
*/
|
||||
|
||||
public void showSpieler() {
|
||||
Spieler sp1 = spielleitung.getSpieler(0);
|
||||
Spieler sp2 = spielleitung.getSpieler(1);
|
||||
// Guthaben anzeigen
|
||||
jNFSpieler1Guthaben.setInt(sp1.getGuthaben());
|
||||
jNFSpieler2Guthaben.setInt(sp2.getGuthaben());
|
||||
// Spieler, der dran ist, dunkler einfuerben
|
||||
if (spielleitung.getSpielerAmZug()==sp1) {
|
||||
jPSpieler1.setBackground(Color.LIGHT_GRAY);
|
||||
jPSpieler2.setBackground(new Color(230,230,230));
|
||||
|
||||
} else {
|
||||
jPSpieler1.setBackground(new Color(230,230,230));
|
||||
jPSpieler2.setBackground(Color.LIGHT_GRAY);
|
||||
|
||||
}// end of if
|
||||
|
||||
// Wenn das Spieler lueuft (beide Spieler haben gesetzt), anzeigen welcher Spieler dran ist
|
||||
if (!jNFSpieler1Einsatz.isEditable() && !jNFSpieler2Einsatz.isEditable()) {
|
||||
if (spielleitung.getSpielerAmZug()==sp1) {
|
||||
jLMeldung.setText("Spieler 1 muss wuerfeln.");
|
||||
} else {
|
||||
jLMeldung.setText("Spieler 2 muss wuerfeln.");
|
||||
}// end of if
|
||||
}
|
||||
}
|
||||
|
||||
/** Aktion: Wuerfelbilder angeklickt.
|
||||
* Wenn das Spiel lueuft, wuerfelt der Spieler, der am Zug ist. Danach wird ausgewertet, ob es
|
||||
* sich um einen Gewinn- oder Verlustwurf handelt.
|
||||
*/
|
||||
public void wuerfelPanel1_MouseClicked(MouseEvent evt) {
|
||||
if (!jNFSpieler1Einsatz.isEditable() && !jNFSpieler2Einsatz.isEditable()) {
|
||||
spielleitung.getWuerfel(0).wuerfeln();
|
||||
spielleitung.getWuerfel(1).wuerfeln();
|
||||
wuerfelPanel1.repaint();
|
||||
if (spielleitung.auswerten()) {
|
||||
// Einsatz wieder auf 0 setzen und Buttons zum Setzen aktivieren
|
||||
jNFSpieler1Einsatz.setInt(0);
|
||||
jNFSpieler1Einsatz.setEditable(true);
|
||||
jNFSpieler2Einsatz.setInt(0);
|
||||
jNFSpieler2Einsatz.setEditable(true);
|
||||
jBSpieler1Setzen.setEnabled(true);
|
||||
jBSpieler2Setzen.setEnabled(true);
|
||||
if (spielleitung.gewinnwurf()) {
|
||||
jLMeldung.setText("Gewonnen! Bitte setzen Sie erneut!");
|
||||
} else {
|
||||
jLMeldung.setText("Verloren! Bitte setzen Sie erneut!");
|
||||
}// end of if
|
||||
|
||||
} // end of if-else
|
||||
showSpieler();
|
||||
|
||||
} // end of if
|
||||
} // end of wuerfelPanel1_MouseClicked
|
||||
|
||||
/** Aktion: Geld setzen von Spieler 1.
|
||||
* Betrag wird gesetzt und der Button zum Setzen deaktiviert.
|
||||
*/
|
||||
public void jBSpieler1Setzen_ActionPerformed(ActionEvent evt) {
|
||||
spielleitung.getSpieler(0).setze(jNFSpieler1Einsatz.getInt());
|
||||
jNFSpieler1Einsatz.setEditable(false);
|
||||
jBSpieler1Setzen.setEnabled(false);
|
||||
showSpieler();
|
||||
} // end of jBSpieler1Setzen_ActionPerformed
|
||||
|
||||
/** Aktion: Geld setzen von Spieler 2.
|
||||
* Betrag wird gesetzt und der Button zum Setzen deaktiviert.
|
||||
*/
|
||||
public void jBSpieler2Setzen_ActionPerformed(ActionEvent evt) {
|
||||
spielleitung.getSpieler(1).setze(jNFSpieler2Einsatz.getInt());
|
||||
jNFSpieler2Einsatz.setEditable(false);
|
||||
jBSpieler2Setzen.setEnabled(false);
|
||||
showSpieler();
|
||||
} // end of jBSpieler2Setzen_ActionPerformed
|
||||
|
||||
// Ende Methoden
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BarbudiGUI("Barbudi");
|
||||
} // end of main
|
||||
|
||||
} // end of class BarbudiGUI
|
||||
427
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/BarbudiGUI.jfm
Normal file
|
|
@ -0,0 +1,427 @@
|
|||
object barbudiGUI: TFGUIFormular
|
||||
Left = 538
|
||||
Top = 56
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = 'BarbudiGUI'
|
||||
ClientHeight = 177
|
||||
ClientWidth = 647
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -10
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
FormStyle = fsMDIChild
|
||||
OldCreateOrder = True
|
||||
Position = poDesigned
|
||||
Visible = True
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnResize = FormResize
|
||||
FrameType = 5
|
||||
Resizable = False
|
||||
Undecorated = False
|
||||
Background = clBtnFace
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object wuerfelPanel1: TJPanel
|
||||
Tag = 38
|
||||
Left = 216
|
||||
Top = 8
|
||||
Width = 201
|
||||
Height = 129
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
mouseClicked = 'wuerfelPanel1_MouseClicked'
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
object jPSpieler1: TJPanel
|
||||
Tag = 12
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 169
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clRed
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel1: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 1'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jLabel2: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel3: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler1Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 48
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
actionPerformed = 'jBSpieler1Setzen_ActionPerformed'
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
end
|
||||
object jPSpieler2: TJPanel
|
||||
Tag = 12
|
||||
Left = 456
|
||||
Top = 8
|
||||
Width = 185
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel21: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel31: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler2Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 64
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
actionPerformed = 'jBSpieler2Setzen_ActionPerformed'
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
object jLabel11: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 2'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
end
|
||||
object jLMeldung: TJLabel
|
||||
Tag = 1
|
||||
Left = 184
|
||||
Top = 144
|
||||
Width = 262
|
||||
Height = 28
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Bitte machen Sie Ihre Eins'#228'tze'
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = CENTER
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,487 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>BarbudiGUI</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="BarbudiGUI";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Class</li>
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?BarbudiGUI.html" target="_top">Frames</a></li>
|
||||
<li><a href="BarbudiGUI.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested_classes_inherited_from_class_javax.swing.JFrame">Nested</a> | </li>
|
||||
<li><a href="#fields_inherited_from_class_javax.swing.JFrame">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h2 title="Class BarbudiGUI" class="title">Class BarbudiGUI</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Component</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Container</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Window</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Frame</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>javax.swing.JFrame</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>BarbudiGUI</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">BarbudiGUI</span>
|
||||
extends javax.swing.JFrame</pre>
|
||||
<div class="block">GUI für das Würfelspiel Spielleitung
|
||||
Zwei Spieler können einen Betrag setzen und dann abwechselnd würfeln.
|
||||
Würfelt einer der Spieler einen Gewinnwurf gewinnt er, der andere verliert.
|
||||
Bei einem Verlustwurf ist es umgekehrt.</div>
|
||||
<dl><dt><span class="strong">Version:</span></dt>
|
||||
<dd>1.0 vom 20.06.2012</dd>
|
||||
<dt><span class="strong">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd>
|
||||
<dt><span class="strong">See Also:</span></dt><dd><a href="serialized-form.html#BarbudiGUI">Serialized Form</a></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_class_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_javax.swing.JFrame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class javax.swing.JFrame</h3>
|
||||
<code>javax.swing.JFrame.AccessibleJFrame</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Frame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Frame</h3>
|
||||
<code>java.awt.Frame.AccessibleAWTFrame</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Window">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Window</h3>
|
||||
<code>java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Container">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Container</h3>
|
||||
<code>java.awt.Container.AccessibleAWTContainer</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Component</h3>
|
||||
<code>java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_javax.swing.JFrame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class javax.swing.JFrame</h3>
|
||||
<code>accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_java.awt.Frame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class java.awt.Frame</h3>
|
||||
<code>CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class java.awt.Component</h3>
|
||||
<code>BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_javax.swing.WindowConstants">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from interface javax.swing.WindowConstants</h3>
|
||||
<code>DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_java.awt.image.ImageObserver">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from interface java.awt.image.ImageObserver</h3>
|
||||
<code>ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="BarbudiGUI.html#BarbudiGUI(java.lang.String)">BarbudiGUI</a></strong>(java.lang.String title)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="BarbudiGUI.html#jBSpieler1Setzen_ActionPerformed(java.awt.event.ActionEvent)">jBSpieler1Setzen_ActionPerformed</a></strong>(java.awt.event.ActionEvent evt)</code>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 1.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="BarbudiGUI.html#jBSpieler2Setzen_ActionPerformed(java.awt.event.ActionEvent)">jBSpieler2Setzen_ActionPerformed</a></strong>(java.awt.event.ActionEvent evt)</code>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 2.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>static void</code></td>
|
||||
<td class="colLast"><code><strong><a href="BarbudiGUI.html#main(java.lang.String[])">main</a></strong>(java.lang.String[] args)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="BarbudiGUI.html#showSpieler()">showSpieler</a></strong>()</code>
|
||||
<div class="block">Informationen über die Spieler werden angezeigt.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="BarbudiGUI.html#wuerfelPanel1_MouseClicked(java.awt.event.MouseEvent)">wuerfelPanel1_MouseClicked</a></strong>(java.awt.event.MouseEvent evt)</code>
|
||||
<div class="block">Aktion: Würfelbilder angeklickt.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.JFrame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class javax.swing.JFrame</h3>
|
||||
<code>addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Frame">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Frame</h3>
|
||||
<code>addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Window">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Window</h3>
|
||||
<code>addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Container">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Container</h3>
|
||||
<code>add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Component</h3>
|
||||
<code>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.MenuContainer">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from interface java.awt.MenuContainer</h3>
|
||||
<code>getFont, postEvent</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="BarbudiGUI(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>BarbudiGUI</h4>
|
||||
<pre>public BarbudiGUI(java.lang.String title)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="showSpieler()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>showSpieler</h4>
|
||||
<pre>public void showSpieler()</pre>
|
||||
<div class="block">Informationen über die Spieler werden angezeigt. Es werden das Guthaben angezeigt
|
||||
und je nach dem, welche Spieler an der Reihe ist, der Hintergrund dunkler eingefärbt.
|
||||
Außerdem wird angezeigt, welcher Spieler dran ist.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="wuerfelPanel1_MouseClicked(java.awt.event.MouseEvent)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>wuerfelPanel1_MouseClicked</h4>
|
||||
<pre>public void wuerfelPanel1_MouseClicked(java.awt.event.MouseEvent evt)</pre>
|
||||
<div class="block">Aktion: Würfelbilder angeklickt.
|
||||
Wenn das Spiel läuft, würfelt der Spieler, der am Zug ist. Danach wird ausgewertet, ob es
|
||||
sich um einen Gewinn- oder Verlustwurf handelt.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="jBSpieler1Setzen_ActionPerformed(java.awt.event.ActionEvent)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>jBSpieler1Setzen_ActionPerformed</h4>
|
||||
<pre>public void jBSpieler1Setzen_ActionPerformed(java.awt.event.ActionEvent evt)</pre>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 1.
|
||||
Betrag wird gesetzt und der Button zum Setzen deaktiviert.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="jBSpieler2Setzen_ActionPerformed(java.awt.event.ActionEvent)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>jBSpieler2Setzen_ActionPerformed</h4>
|
||||
<pre>public void jBSpieler2Setzen_ActionPerformed(java.awt.event.ActionEvent evt)</pre>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 2.
|
||||
Betrag wird gesetzt und der Button zum Setzen deaktiviert.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="main(java.lang.String[])">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>main</h4>
|
||||
<pre>public static void main(java.lang.String[] args)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Class</li>
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?BarbudiGUI.html" target="_top">Frames</a></li>
|
||||
<li><a href="BarbudiGUI.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested_classes_inherited_from_class_javax.swing.JFrame">Nested</a> | </li>
|
||||
<li><a href="#fields_inherited_from_class_javax.swing.JFrame">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
user:Benutzer[a]
|
||||
spielleitung:Spielleitung
|
||||
spieler:ArrayList<Spieler>
|
||||
s:Spieler
|
||||
wuerfel0:Wuerfel
|
||||
wuerfel1:Wuerfel
|
||||
|
||||
user:spielleitung[a].auswerten()
|
||||
spielleitung[a]:true/false=spielleitung[b].gewinnwurf()
|
||||
spielleitung[b]:augenzahl=wuerfel0.getWurf()
|
||||
spielleitung[b]:augenzahl=wuerfel1.getWurf()
|
||||
[c falls Gewinnwurf, für jeden Spieler]
|
||||
spielleitung[a]:s=spieler.get(i)
|
||||
spielleitung[a]:s.gewonnen/verloren()
|
||||
[/c]
|
||||
spielleitung[a]:true/false=spielleitung[c].verlustwurf()
|
||||
spielleitung[c]:augenzahl=wuerfel0.getWurf()
|
||||
spielleitung[c]:augenzahl=wuerfel1.getWurf()
|
||||
[c falls Verlustwurf, für jeden Spieler]
|
||||
spielleitung[a]:s=spieler.get(i)
|
||||
spielleitung[a]:s.verloren/gewonnen()
|
||||
[/c]
|
||||
spielleitung[a]:anzahl=spieler.size()
|
||||
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -0,0 +1,10 @@
|
|||
user:Benutzer[a]
|
||||
spielleitung:Spielleitung
|
||||
wuerfel0:Wuerfel
|
||||
wuerfel1:Wuerfel
|
||||
spieler0:Spieler
|
||||
spieler1:Spieler
|
||||
|
||||
user:spieler0=spielleitung.getSpieler(0)
|
||||
user:spieler0.setze(betrag)
|
||||
|
||||
|
After Width: | Height: | Size: 7.1 KiB |
|
|
@ -0,0 +1,17 @@
|
|||
user:Benutzer[a]
|
||||
/spielleitung:Spielleitung
|
||||
/wuerfel0:Wuerfel
|
||||
/wuerfel1:Wuerfel
|
||||
/spieler0:Spieler
|
||||
/spieler1:Spieler
|
||||
|
||||
user:spielleitung.new
|
||||
spielleitung:wuerfel0.new
|
||||
wuerfel0:wuerfel0.wuerfeln
|
||||
spielleitung:wuerfel1.new
|
||||
wuerfel1:wuerfel1.wuerfeln
|
||||
user:spieler0.new(Startguthaben)
|
||||
user:spieler1.new(Startguthaben)
|
||||
user:spielleitung.addSpieler(spieler1)
|
||||
user:spielleitung.addSpieler(spieler2)
|
||||
|
||||
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -0,0 +1,16 @@
|
|||
user:Benutzer[a]
|
||||
spielleitung:Spielleitung
|
||||
spieler0:Spieler
|
||||
spieler1:Spieler
|
||||
wuerfel0:Wuerfel
|
||||
wuerfel1:Wuerfel
|
||||
|
||||
user:wuerfel0=spielleitung.getWuerfel(0)
|
||||
user:wuerfel0.wuerfeln()
|
||||
user:wuerfel1=spielleitung.getWuerfel(1)
|
||||
user:wuerfel1.wuerfeln()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 9.6 KiB |
|
|
@ -0,0 +1,313 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>Spieler</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Spieler";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="BarbudiGUI.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Spieler.html" target="_top">Frames</a></li>
|
||||
<li><a href="Spieler.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h2 title="Class Spieler" class="title">Class Spieler</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>Spieler</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">Spieler</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.</div>
|
||||
<dl><dt><span class="strong">Version:</span></dt>
|
||||
<dd>1.0 vom 19.06.2012</dd>
|
||||
<dt><span class="strong">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="Spieler.html#Spieler(int)">Spieler</a></strong>(int guthaben)</code>
|
||||
<div class="block">Erzeugt einen Spieler mit einem bestimmten Startguthaben.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spieler.html#getGuthaben()">getGuthaben</a></strong>()</code>
|
||||
<div class="block">Liefert das aktuelle Guthaben des Spielers.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spieler.html#gewonnen()">gewonnen</a></strong>()</code>
|
||||
<div class="block">Rechnet den Gewinn des Spielers ab, da er gewonnen hat.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spieler.html#setze(int)">setze</a></strong>(int betrag)</code>
|
||||
<div class="block">Setzt den Einsatz für das nächste Spiel.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spieler.html#verloren()">verloren</a></strong>()</code>
|
||||
<div class="block">Da der Spieler verloren hat, ist der Einsatz verloren.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="Spieler(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Spieler</h4>
|
||||
<pre>public Spieler(int guthaben)</pre>
|
||||
<div class="block">Erzeugt einen Spieler mit einem bestimmten Startguthaben.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>guthaben</code> - Startguthaben des Spielers</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="getGuthaben()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getGuthaben</h4>
|
||||
<pre>public int getGuthaben()</pre>
|
||||
<div class="block">Liefert das aktuelle Guthaben des Spielers.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>Guthaben des Spielers</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="setze(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setze</h4>
|
||||
<pre>public void setze(int betrag)</pre>
|
||||
<div class="block">Setzt den Einsatz für das nächste Spiel.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>betrag</code> - eingesetzter Betrag</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="gewonnen()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>gewonnen</h4>
|
||||
<pre>public void gewonnen()</pre>
|
||||
<div class="block">Rechnet den Gewinn des Spielers ab, da er gewonnen hat.</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="verloren()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>verloren</h4>
|
||||
<pre>public void verloren()</pre>
|
||||
<div class="block">Da der Spieler verloren hat, ist der Einsatz verloren.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="BarbudiGUI.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Spieler.html" target="_top">Frames</a></li>
|
||||
<li><a href="Spieler.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,369 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>Spielleitung</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Spielleitung";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Spielleitung.html" target="_top">Frames</a></li>
|
||||
<li><a href="Spielleitung.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h2 title="Class Spielleitung" class="title">Class Spielleitung</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>Spielleitung</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">Spielleitung</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Spielleiter für das Würfelspiel Spielleitung .
|
||||
Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.</div>
|
||||
<dl><dt><span class="strong">Version:</span></dt>
|
||||
<dd>1.0 vom 20.06.2012</dd>
|
||||
<dt><span class="strong">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="Spielleitung.html#Spielleitung()">Spielleitung</a></strong>()</code>
|
||||
<div class="block">Erzeugt den Spielleiter für Spielleitung.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#addSpieler(Spieler)">addSpieler</a></strong>(<a href="Spieler.html" title="class in <Unnamed>">Spieler</a> s)</code>
|
||||
<div class="block">Meldet einen Spieler beim Spielleiter an.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#auswerten()">auswerten</a></strong>()</code>
|
||||
<div class="block">Wertet den letzten Würfelwurf aus.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code><a href="Spieler.html" title="class in <Unnamed>">Spieler</a></code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#getSpieler(int)">getSpieler</a></strong>(int nr)</code>
|
||||
<div class="block">liefert eine Referenz auf einen Spieler</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code><a href="Spieler.html" title="class in <Unnamed>">Spieler</a></code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#getSpielerAmZug()">getSpielerAmZug</a></strong>()</code>
|
||||
<div class="block">liefert eine Referenz auf den Spieler der am Zug ist</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code><a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#getWuerfel(int)">getWuerfel</a></strong>(int nr)</code>
|
||||
<div class="block">liefert eine Referenz auf einen Würfel</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#gewinnwurf()">gewinnwurf</a></strong>()</code>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="Spielleitung.html#verlustwurf()">verlustwurf</a></strong>()</code>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="Spielleitung()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Spielleitung</h4>
|
||||
<pre>public Spielleitung()</pre>
|
||||
<div class="block">Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="addSpieler(Spieler)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>addSpieler</h4>
|
||||
<pre>public void addSpieler(<a href="Spieler.html" title="class in <Unnamed>">Spieler</a> s)</pre>
|
||||
<div class="block">Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>s</code> - Spieler, der angemeldet werden soll.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="gewinnwurf()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>gewinnwurf</h4>
|
||||
<pre>public boolean gewinnwurf()</pre>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true, wenn es sich um einen Gewinnwurf handelt, sonst false.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="verlustwurf()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>verlustwurf</h4>
|
||||
<pre>public boolean verlustwurf()</pre>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true, wenn es sich um einen Verlustwurf handelt, sonst false.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="auswerten()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>auswerten</h4>
|
||||
<pre>public boolean auswerten()</pre>
|
||||
<div class="block">Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
werden die Spieler über ihren Sieg / Verlust informiert.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getWuerfel(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getWuerfel</h4>
|
||||
<pre>public <a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> getWuerfel(int nr)</pre>
|
||||
<div class="block">liefert eine Referenz auf einen Würfel</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>nr</code> - Nummer des gewünschten Würfels</dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>Referenz auf den Würfel</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSpieler(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getSpieler</h4>
|
||||
<pre>public <a href="Spieler.html" title="class in <Unnamed>">Spieler</a> getSpieler(int nr)</pre>
|
||||
<div class="block">liefert eine Referenz auf einen Spieler</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>nr</code> - Nummer des gewünschten Spielers</dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>Referenz auf den Spieler</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSpielerAmZug()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getSpielerAmZug</h4>
|
||||
<pre>public <a href="Spieler.html" title="class in <Unnamed>">Spieler</a> getSpielerAmZug()</pre>
|
||||
<div class="block">liefert eine Referenz auf den Spieler der am Zug ist</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>Referenz auf den Spieler</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Spielleitung.html" target="_top">Frames</a></li>
|
||||
<li><a href="Spielleitung.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>Wuerfel</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Wuerfel";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="WuerfelPanel.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Wuerfel.html" target="_top">Frames</a></li>
|
||||
<li><a href="Wuerfel.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h2 title="Class Wuerfel" class="title">Class Wuerfel</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>Wuerfel</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">Wuerfel</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
Wurf ermittelt.</div>
|
||||
<dl><dt><span class="strong">Version:</span></dt>
|
||||
<dd>1.0 vom 19.06.2012</dd>
|
||||
<dt><span class="strong">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="Wuerfel.html#Wuerfel()">Wuerfel</a></strong>()</code>
|
||||
<div class="block">Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
liegen zu lassen.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="Wuerfel.html#getWurf()">getWurf</a></strong>()</code>
|
||||
<div class="block">Liefert das Ergebnis des letzten Würfelns.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="Wuerfel.html#wuerfeln()">wuerfeln</a></strong>()</code>
|
||||
<div class="block">Würfelt den Würfel.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="Wuerfel()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>Wuerfel</h4>
|
||||
<pre>public Wuerfel()</pre>
|
||||
<div class="block">Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
liegen zu lassen.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="getWurf()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getWurf</h4>
|
||||
<pre>public int getWurf()</pre>
|
||||
<div class="block">Liefert das Ergebnis des letzten Würfelns.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>wurf Augenzahl des letzten Wurfs.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="wuerfeln()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>wuerfeln</h4>
|
||||
<pre>public void wuerfeln()</pre>
|
||||
<div class="block">Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="WuerfelPanel.html" title="class in <Unnamed>"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?Wuerfel.html" target="_top">Frames</a></li>
|
||||
<li><a href="Wuerfel.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,389 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>WuerfelPanel</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="WuerfelPanel";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?WuerfelPanel.html" target="_top">Frames</a></li>
|
||||
<li><a href="WuerfelPanel.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested_classes_inherited_from_class_javax.swing.JPanel">Nested</a> | </li>
|
||||
<li><a href="#fields_inherited_from_class_javax.swing.JComponent">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h2 title="Class WuerfelPanel" class="title">Class WuerfelPanel</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Component</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.awt.Container</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>javax.swing.JComponent</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>javax.swing.JPanel</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>WuerfelPanel</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">WuerfelPanel</span>
|
||||
extends javax.swing.JPanel</pre>
|
||||
<div class="block">Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.
|
||||
Je nach Augenzahl der letzten Würfelergebnisse werden die Bilder wuerfel_1.gif - wuerfel_6.gif angezeigt.</div>
|
||||
<dl><dt><span class="strong">Version:</span></dt>
|
||||
<dd>1.0 vom 16.06.2012</dd>
|
||||
<dt><span class="strong">Author:</span></dt>
|
||||
<dd>Thomas Schaller</dd>
|
||||
<dt><span class="strong">See Also:</span></dt><dd><a href="serialized-form.html#WuerfelPanel">Serialized Form</a></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_class_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested Class Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_javax.swing.JPanel">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class javax.swing.JPanel</h3>
|
||||
<code>javax.swing.JPanel.AccessibleJPanel</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_javax.swing.JComponent">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class javax.swing.JComponent</h3>
|
||||
<code>javax.swing.JComponent.AccessibleJComponent</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Container">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Container</h3>
|
||||
<code>java.awt.Container.AccessibleAWTContainer</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="nested_classes_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Nested classes/interfaces inherited from class java.awt.Component</h3>
|
||||
<code>java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_javax.swing.JComponent">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class javax.swing.JComponent</h3>
|
||||
<code>accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class java.awt.Component</h3>
|
||||
<code>BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_java.awt.image.ImageObserver">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from interface java.awt.image.ImageObserver</h3>
|
||||
<code>ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="WuerfelPanel.html#WuerfelPanel(Wuerfel, Wuerfel)">WuerfelPanel</a></strong>(<a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> w1,
|
||||
<a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> w2)</code>
|
||||
<div class="block">Erzeugt ein Anzeigepanel für zwei Würfel.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="WuerfelPanel.html#paint(java.awt.Graphics)">paint</a></strong>(java.awt.Graphics g)</code>
|
||||
<div class="block">Zeichnet das Panel.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.JPanel">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class javax.swing.JPanel</h3>
|
||||
<code>getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_javax.swing.JComponent">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class javax.swing.JComponent</h3>
|
||||
<code>addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Container">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Container</h3>
|
||||
<code>add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.awt.Component">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.awt.Component</h3>
|
||||
<code>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="WuerfelPanel(Wuerfel, Wuerfel)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>WuerfelPanel</h4>
|
||||
<pre>public WuerfelPanel(<a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> w1,
|
||||
<a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> w2)</pre>
|
||||
<div class="block">Erzeugt ein Anzeigepanel für zwei Würfel.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>w1</code> - 1. Würfel</dd><dd><code>w2</code> - 2. Würfel</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="paint(java.awt.Graphics)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>paint</h4>
|
||||
<pre>public void paint(java.awt.Graphics g)</pre>
|
||||
<div class="block">Zeichnet das Panel. Angezeigt werden die Bilder für die zwei Augenzahlen der beiden Würfel.
|
||||
Diese Methode wird automatisch von Java aufgerufen.</div>
|
||||
<dl>
|
||||
<dt><strong>Overrides:</strong></dt>
|
||||
<dd><code>paint</code> in class <code>javax.swing.JComponent</code></dd>
|
||||
<dt><span class="strong">Parameters:</span></dt><dd><code>g</code> - Grafikkontext auf dem gezeichnet werden soll.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?WuerfelPanel.html" target="_top">Frames</a></li>
|
||||
<li><a href="WuerfelPanel.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li><a href="#nested_classes_inherited_from_class_javax.swing.JPanel">Nested</a> | </li>
|
||||
<li><a href="#fields_inherited_from_class_javax.swing.JComponent">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="BarbudiGUI.html" title="class in <Unnamed>" target="classFrame">BarbudiGUI</a></li>
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>" target="classFrame">Spieler</a></li>
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>" target="classFrame">Spielleitung</a></li>
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>" target="classFrame">Wuerfel</a></li>
|
||||
<li><a href="WuerfelPanel.html" title="class in <Unnamed>" target="classFrame">WuerfelPanel</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>All Classes</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></li>
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>">Spieler</a></li>
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></li>
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></li>
|
||||
<li><a href="WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>Constant Field Values</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Constant Field Values";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>Deprecated List</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Deprecated List";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="Deprecated API" class="title">Deprecated API</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>API Help</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API Help";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">How This API Document Is Organized</h1>
|
||||
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2>Package</h2>
|
||||
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
|
||||
<ul>
|
||||
<li>Interfaces (italic)</li>
|
||||
<li>Classes</li>
|
||||
<li>Enums</li>
|
||||
<li>Exceptions</li>
|
||||
<li>Errors</li>
|
||||
<li>Annotation Types</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Class/Interface</h2>
|
||||
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
|
||||
<ul>
|
||||
<li>Class inheritance diagram</li>
|
||||
<li>Direct Subclasses</li>
|
||||
<li>All Known Subinterfaces</li>
|
||||
<li>All Known Implementing Classes</li>
|
||||
<li>Class/interface declaration</li>
|
||||
<li>Class/interface description</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Nested Class Summary</li>
|
||||
<li>Field Summary</li>
|
||||
<li>Constructor Summary</li>
|
||||
<li>Method Summary</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Field Detail</li>
|
||||
<li>Constructor Detail</li>
|
||||
<li>Method Detail</li>
|
||||
</ul>
|
||||
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Annotation Type</h2>
|
||||
<p>Each annotation type has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Annotation Type declaration</li>
|
||||
<li>Annotation Type description</li>
|
||||
<li>Required Element Summary</li>
|
||||
<li>Optional Element Summary</li>
|
||||
<li>Element Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Enum</h2>
|
||||
<p>Each enum has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Enum declaration</li>
|
||||
<li>Enum description</li>
|
||||
<li>Enum Constant Summary</li>
|
||||
<li>Enum Constant Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Tree (Class Hierarchy)</h2>
|
||||
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||
<ul>
|
||||
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
|
||||
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Deprecated API</h2>
|
||||
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Index</h2>
|
||||
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Prev/Next</h2>
|
||||
<p>These links take you to the next or previous class, interface, package, or related page.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Frames/No Frames</h2>
|
||||
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>All Classes</h2>
|
||||
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Serialized Form</h2>
|
||||
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Constant Field Values</h2>
|
||||
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,276 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>Index</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Index";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="./package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="./overview-tree.html">Tree</a></li>
|
||||
<li><a href="./deprecated-list.html">Deprecated</a></li>
|
||||
<li class="navBarCell1Rev">Index</li>
|
||||
<li><a href="./help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
|
||||
<li><a href="index-all.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="./allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="contentContainer"><a href="#_A_">A</a> <a href="#_B_">B</a> <a href="#_G_">G</a> <a href="#_J_">J</a> <a href="#_M_">M</a> <a href="#_P_">P</a> <a href="#_S_">S</a> <a href="#_V_">V</a> <a href="#_W_">W</a> <a name="_A_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">A</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#addSpieler(Spieler)">addSpieler(Spieler)</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">Meldet einen Spieler beim Spielleiter an.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#auswerten()">auswerten()</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">Wertet den letzten Würfelwurf aus.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_B_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">B</h2>
|
||||
<dl>
|
||||
<dt><a href="./BarbudiGUI.html" title="class in <Unnamed>"><span class="strong">BarbudiGUI</span></a> - Class in <a href="./package-summary.html"><Unnamed></a></dt>
|
||||
<dd>
|
||||
<div class="block">GUI für das Würfelspiel Spielleitung
|
||||
Zwei Spieler können einen Betrag setzen und dann abwechselnd würfeln.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#BarbudiGUI(java.lang.String)">BarbudiGUI(String)</a></span> - Constructor for class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a name="_G_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">G</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./Spieler.html#getGuthaben()">getGuthaben()</a></span> - Method in class <a href="./Spieler.html" title="class in <Unnamed>">Spieler</a></dt>
|
||||
<dd>
|
||||
<div class="block">Liefert das aktuelle Guthaben des Spielers.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#getSpieler(int)">getSpieler(int)</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">liefert eine Referenz auf einen Spieler</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#getSpielerAmZug()">getSpielerAmZug()</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">liefert eine Referenz auf den Spieler der am Zug ist</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#getWuerfel(int)">getWuerfel(int)</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">liefert eine Referenz auf einen Würfel</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Wuerfel.html#getWurf()">getWurf()</a></span> - Method in class <a href="./Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></dt>
|
||||
<dd>
|
||||
<div class="block">Liefert das Ergebnis des letzten Würfelns.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#gewinnwurf()">gewinnwurf()</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spieler.html#gewonnen()">gewonnen()</a></span> - Method in class <a href="./Spieler.html" title="class in <Unnamed>">Spieler</a></dt>
|
||||
<dd>
|
||||
<div class="block">Rechnet den Gewinn des Spielers ab, da er gewonnen hat.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_J_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">J</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#jBSpieler1Setzen_ActionPerformed(java.awt.event.ActionEvent)">jBSpieler1Setzen_ActionPerformed(ActionEvent)</a></span> - Method in class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 1.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#jBSpieler2Setzen_ActionPerformed(java.awt.event.ActionEvent)">jBSpieler2Setzen_ActionPerformed(ActionEvent)</a></span> - Method in class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd>
|
||||
<div class="block">Aktion: Geld setzen von Spieler 2.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_M_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">M</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#main(java.lang.String[])">main(String[])</a></span> - Static method in class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
<a name="_P_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">P</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./WuerfelPanel.html#paint(java.awt.Graphics)">paint(Graphics)</a></span> - Method in class <a href="./WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a></dt>
|
||||
<dd>
|
||||
<div class="block">Zeichnet das Panel.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_S_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">S</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./Spieler.html#setze(int)">setze(int)</a></span> - Method in class <a href="./Spieler.html" title="class in <Unnamed>">Spieler</a></dt>
|
||||
<dd>
|
||||
<div class="block">Setzt den Einsatz für das nächste Spiel.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#showSpieler()">showSpieler()</a></span> - Method in class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd>
|
||||
<div class="block">Informationen über die Spieler werden angezeigt.</div>
|
||||
</dd>
|
||||
<dt><a href="./Spieler.html" title="class in <Unnamed>"><span class="strong">Spieler</span></a> - Class in <a href="./package-summary.html"><Unnamed></a></dt>
|
||||
<dd>
|
||||
<div class="block">Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spieler.html#Spieler(int)">Spieler(int)</a></span> - Constructor for class <a href="./Spieler.html" title="class in <Unnamed>">Spieler</a></dt>
|
||||
<dd>
|
||||
<div class="block">Erzeugt einen Spieler mit einem bestimmten Startguthaben.</div>
|
||||
</dd>
|
||||
<dt><a href="./Spielleitung.html" title="class in <Unnamed>"><span class="strong">Spielleitung</span></a> - Class in <a href="./package-summary.html"><Unnamed></a></dt>
|
||||
<dd>
|
||||
<div class="block">Spielleiter für das Würfelspiel Spielleitung .</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#Spielleitung()">Spielleitung()</a></span> - Constructor for class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">Erzeugt den Spielleiter für Spielleitung.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_V_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">V</h2>
|
||||
<dl>
|
||||
<dt><span class="strong"><a href="./Spieler.html#verloren()">verloren()</a></span> - Method in class <a href="./Spieler.html" title="class in <Unnamed>">Spieler</a></dt>
|
||||
<dd>
|
||||
<div class="block">Da der Spieler verloren hat, ist der Einsatz verloren.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Spielleitung.html#verlustwurf()">verlustwurf()</a></span> - Method in class <a href="./Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></dt>
|
||||
<dd>
|
||||
<div class="block">Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_W_">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 class="title">W</h2>
|
||||
<dl>
|
||||
<dt><a href="./Wuerfel.html" title="class in <Unnamed>"><span class="strong">Wuerfel</span></a> - Class in <a href="./package-summary.html"><Unnamed></a></dt>
|
||||
<dd>
|
||||
<div class="block">Stellt einen Würfel für Würfelspiele bereit.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Wuerfel.html#Wuerfel()">Wuerfel()</a></span> - Constructor for class <a href="./Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></dt>
|
||||
<dd>
|
||||
<div class="block">Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
liegen zu lassen.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./Wuerfel.html#wuerfeln()">wuerfeln()</a></span> - Method in class <a href="./Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></dt>
|
||||
<dd>
|
||||
<div class="block">Würfelt den Würfel.</div>
|
||||
</dd>
|
||||
<dt><a href="./WuerfelPanel.html" title="class in <Unnamed>"><span class="strong">WuerfelPanel</span></a> - Class in <a href="./package-summary.html"><Unnamed></a></dt>
|
||||
<dd>
|
||||
<div class="block">Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./WuerfelPanel.html#WuerfelPanel(Wuerfel, Wuerfel)">WuerfelPanel(Wuerfel, Wuerfel)</a></span> - Constructor for class <a href="./WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a></dt>
|
||||
<dd>
|
||||
<div class="block">Erzeugt ein Anzeigepanel für zwei Würfel.</div>
|
||||
</dd>
|
||||
<dt><span class="strong"><a href="./BarbudiGUI.html#wuerfelPanel1_MouseClicked(java.awt.event.MouseEvent)">wuerfelPanel1_MouseClicked(MouseEvent)</a></span> - Method in class <a href="./BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></dt>
|
||||
<dd>
|
||||
<div class="block">Aktion: Würfelbilder angeklickt.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a href="#_A_">A</a> <a href="#_B_">B</a> <a href="#_G_">G</a> <a href="#_J_">J</a> <a href="#_M_">M</a> <a href="#_P_">P</a> <a href="#_S_">S</a> <a href="#_V_">V</a> <a href="#_W_">W</a> </div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="./package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="./overview-tree.html">Tree</a></li>
|
||||
<li><a href="./deprecated-list.html">Deprecated</a></li>
|
||||
<li class="navBarCell1Rev">Index</li>
|
||||
<li><a href="./help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
|
||||
<li><a href="index-all.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="./allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<script type="text/javascript">
|
||||
targetPage = "" + window.location.search;
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
targetPage = targetPage.substring(1);
|
||||
if (targetPage.indexOf(":") != -1)
|
||||
targetPage = "undefined";
|
||||
function loadFrames() {
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||
<frame src="BarbudiGUI.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||
<noframes>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<h2>Frame Alert</h2>
|
||||
<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="BarbudiGUI.html">Non-frame version</a>.</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>Class Hierarchy</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Class Hierarchy";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For All Packages</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">java.awt.Container
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JComponent (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JPanel (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li type="circle"><a href="WuerfelPanel.html" title="class in <Unnamed>"><span class="strong">WuerfelPanel</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">java.awt.Window (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li type="circle">java.awt.Frame (implements java.awt.MenuContainer)
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
|
||||
<ul>
|
||||
<li type="circle"><a href="BarbudiGUI.html" title="class in <Unnamed>"><span class="strong">BarbudiGUI</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle"><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Spieler</span></a></li>
|
||||
<li type="circle"><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Spielleitung</span></a></li>
|
||||
<li type="circle"><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Wuerfel</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title>&lt;Unnamed&gt;</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar"><a href="package-summary.html" target="classFrame"><Unnamed></a></h1>
|
||||
<div class="indexContainer">
|
||||
<h2 title="Classes">Classes</h2>
|
||||
<ul title="Classes">
|
||||
<li><a href="BarbudiGUI.html" title="class in <Unnamed>" target="classFrame">BarbudiGUI</a></li>
|
||||
<li><a href="Spieler.html" title="class in <Unnamed>" target="classFrame">Spieler</a></li>
|
||||
<li><a href="Spielleitung.html" title="class in <Unnamed>" target="classFrame">Spielleitung</a></li>
|
||||
<li><a href="Wuerfel.html" title="class in <Unnamed>" target="classFrame">Wuerfel</a></li>
|
||||
<li><a href="WuerfelPanel.html" title="class in <Unnamed>" target="classFrame">WuerfelPanel</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package <Unnamed></h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
|
||||
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Class</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">GUI für das Würfelspiel Spielleitung
|
||||
Zwei Spieler können einen Betrag setzen und dann abwechselnd würfeln.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="Spieler.html" title="class in <Unnamed>">Spieler</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="Spielleitung.html" title="class in <Unnamed>">Spielleitung</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Spielleiter für das Würfelspiel Spielleitung .</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Stellt einen Würfel für Würfelspiele bereit.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:08 CET 2012 -->
|
||||
<title> Class Hierarchy</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title=" Class Hierarchy";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package <Unnamed></h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">java.awt.Container
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JComponent (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JPanel (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li type="circle"><a href="WuerfelPanel.html" title="class in <Unnamed>"><span class="strong">WuerfelPanel</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">java.awt.Window (implements javax.accessibility.Accessible)
|
||||
<ul>
|
||||
<li type="circle">java.awt.Frame (implements java.awt.MenuContainer)
|
||||
<ul>
|
||||
<li type="circle">javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
|
||||
<ul>
|
||||
<li type="circle"><a href="BarbudiGUI.html" title="class in <Unnamed>"><span class="strong">BarbudiGUI</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle"><a href="Spieler.html" title="class in <Unnamed>"><span class="strong">Spieler</span></a></li>
|
||||
<li type="circle"><a href="Spielleitung.html" title="class in <Unnamed>"><span class="strong">Spielleitung</span></a></li>
|
||||
<li type="circle"><a href="Wuerfel.html" title="class in <Unnamed>"><span class="strong">Wuerfel</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 291 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 849 B |
|
|
@ -0,0 +1,237 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (version 1.7.0_03) on Sat Dec 22 13:43:09 CET 2012 -->
|
||||
<title>Serialized Form</title>
|
||||
<meta name="date" content="2012-12-22">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Serialized Form";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="Serialized Form" class="title">Serialized Form</h1>
|
||||
</div>
|
||||
<div class="serializedFormContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2 title="Package">Package &lt;Unnamed&gt;</h2>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="BarbudiGUI">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class <a href="BarbudiGUI.html" title="class in <Unnamed>">BarbudiGUI</a> extends javax.swing.JFrame implements Serializable</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="serializedForm">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>spielleitung</h4>
|
||||
<pre><a href="Spielleitung.html" title="class in <Unnamed>">Spielleitung</a> spielleitung</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>wuerfelPanel1</h4>
|
||||
<pre><a href="WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a> wuerfelPanel1</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jPSpieler1</h4>
|
||||
<pre>javax.swing.JPanel jPSpieler1</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel1</h4>
|
||||
<pre>javax.swing.JLabel jLabel1</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel2</h4>
|
||||
<pre>javax.swing.JLabel jLabel2</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jNFSpieler1Guthaben</h4>
|
||||
<pre>JNumberField jNFSpieler1Guthaben</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel3</h4>
|
||||
<pre>javax.swing.JLabel jLabel3</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jNFSpieler1Einsatz</h4>
|
||||
<pre>JNumberField jNFSpieler1Einsatz</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jBSpieler1Setzen</h4>
|
||||
<pre>javax.swing.JButton jBSpieler1Setzen</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jPSpieler2</h4>
|
||||
<pre>javax.swing.JPanel jPSpieler2</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel21</h4>
|
||||
<pre>javax.swing.JLabel jLabel21</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jNFSpieler2Guthaben</h4>
|
||||
<pre>JNumberField jNFSpieler2Guthaben</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel31</h4>
|
||||
<pre>javax.swing.JLabel jLabel31</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jNFSpieler2Einsatz</h4>
|
||||
<pre>JNumberField jNFSpieler2Einsatz</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jBSpieler2Setzen</h4>
|
||||
<pre>javax.swing.JButton jBSpieler2Setzen</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>jLabel11</h4>
|
||||
<pre>javax.swing.JLabel jLabel11</pre>
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>jLMeldung</h4>
|
||||
<pre>javax.swing.JLabel jLMeldung</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList"><a name="JNumberField">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class JNumberField extends javax.swing.JTextField implements Serializable</h3>
|
||||
</li>
|
||||
<li class="blockList"><a name="NumberField">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class NumberField extends java.awt.TextField implements Serializable</h3>
|
||||
</li>
|
||||
<li class="blockList"><a name="WuerfelPanel">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class <a href="WuerfelPanel.html" title="class in <Unnamed>">WuerfelPanel</a> extends javax.swing.JPanel implements Serializable</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="serializedForm">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>bilder</h4>
|
||||
<pre>java.awt.Image[] bilder</pre>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>wuerfel1</h4>
|
||||
<pre><a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> wuerfel1</pre>
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>wuerfel2</h4>
|
||||
<pre><a href="Wuerfel.html" title="class in <Unnamed>">Wuerfel</a> wuerfel2</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,474 @@
|
|||
/* Javadoc style sheet */
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
font-size:76%;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h1 {
|
||||
font-size:1.8em;
|
||||
}
|
||||
h2 {
|
||||
font-size:1.5em;
|
||||
}
|
||||
h3 {
|
||||
font-size:1.4em;
|
||||
}
|
||||
h4 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h5 {
|
||||
font-size:1.2em;
|
||||
}
|
||||
h6 {
|
||||
font-size:1.1em;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-size:1.2em;
|
||||
}
|
||||
dt code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-size:1.2em;
|
||||
vertical-align:top;
|
||||
}
|
||||
sup {
|
||||
font-size:.6em;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:.8em;
|
||||
z-index:200;
|
||||
margin-top:-7px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
background-position:left top;
|
||||
background-repeat:no-repeat;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:1em;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding:3px 6px;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
font-size:90%;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-image:url(resources/tab.gif);
|
||||
background-color:#a88834;
|
||||
color:#FFFFFF;
|
||||
margin: auto 5px;
|
||||
border:1px solid #c9aa44;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 25px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:1.2em;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:1.0em;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:1.1em;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:1.1em;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:10px 0 10px 20px;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:25px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #9eadc0;
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:1px solid #9eadc0;
|
||||
border-top:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.contentContainer table, .classUseContainer table, .constantValuesContainer table {
|
||||
border-bottom:1px solid #9eadc0;
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer .description table, .contentContainer .details table {
|
||||
border-bottom:none;
|
||||
}
|
||||
.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
|
||||
vertical-align:top;
|
||||
padding-right:20px;
|
||||
}
|
||||
.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
|
||||
.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
|
||||
.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
|
||||
.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
|
||||
padding-right:3px;
|
||||
}
|
||||
.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
caption a:link, caption a:hover, caption a:active, caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:8px;
|
||||
padding-left:8px;
|
||||
display:block;
|
||||
float:left;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
height:18px;
|
||||
}
|
||||
.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
|
||||
width:10px;
|
||||
background-image:url(resources/titlebar_end.gif);
|
||||
background-repeat:no-repeat;
|
||||
background-position:top right;
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList table {
|
||||
margin:0 0 12px 0px;
|
||||
width:100%;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color: #EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#eeeeef;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
|
||||
background:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
border-left:1px solid #9eadc0;
|
||||
white-space:nowrap;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
border-right:1px solid #9eadc0;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
border-right:1px solid #9eadc0;
|
||||
border-left:1px solid #9eadc0;
|
||||
}
|
||||
table.overviewSummary {
|
||||
padding:0px;
|
||||
margin-left:0px;
|
||||
}
|
||||
table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
|
||||
table.overviewSummary td.colOne, table.overviewSummary th.colOne {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:.9em;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 0 0 0;
|
||||
}
|
||||
.strong {
|
||||
font-weight:bold;
|
||||
}
|
||||
129
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/JNumberField.java
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
Swing-component for input and output of numeric values.
|
||||
*/
|
||||
|
||||
public class JNumberField extends JTextField {
|
||||
|
||||
/** constructor for a JNumberField */
|
||||
public JNumberField() {
|
||||
enableEvents(AWTEvent.KEY_EVENT_MASK);
|
||||
}
|
||||
|
||||
/** Gets a double-value from the JNumberField. */
|
||||
public double getDouble() {
|
||||
Double d = new Double(getText());
|
||||
return d.doubleValue();
|
||||
}
|
||||
|
||||
/** Gets a float-value from the JNumberField. */
|
||||
public float getFloat() {
|
||||
Double d = new Double(getText());
|
||||
return d.floatValue();
|
||||
}
|
||||
|
||||
/** Gets an int-value from the JNumberField. */
|
||||
public int getInt() {
|
||||
Double d = new Double(getText());
|
||||
return d.intValue();
|
||||
}
|
||||
|
||||
/** Gets a long-value from the JNumberField. */
|
||||
public long getLong() {
|
||||
Double d = new Double(getText());
|
||||
return d.longValue();
|
||||
}
|
||||
|
||||
/** Checks wether the JNumberField contains a valid numeric value. */
|
||||
public boolean isNumeric() {
|
||||
final String Digits = "(\\p{Digit}+)";
|
||||
final String HexDigits = "(\\p{XDigit}+)";
|
||||
// an exponent is 'e' or 'E' followed by an optionally
|
||||
// signed decimal integer.
|
||||
final String Exp = "[eE][+-]?"+Digits;
|
||||
final String fpRegex =
|
||||
("[\\x00-\\x20]*"+ // Optional leading "whitespace"
|
||||
"[+-]?(" + // Optional sign character
|
||||
"NaN|" + // "NaN" string
|
||||
"Infinity|" + // "Infinity" string
|
||||
|
||||
// A decimal floating-point string representing a finite positive
|
||||
// number without a leading sign has at most five basic pieces:
|
||||
// Digits . Digits ExponentPart FloatTypeSuffix
|
||||
//
|
||||
// Since this method allows integer-only strings as input
|
||||
// in addition to strings of floating-point literals, the
|
||||
// two sub-patterns below are simplifications of the grammar
|
||||
// productions from the Java Language Specification, 2nd
|
||||
// edition, section 3.10.2.
|
||||
|
||||
// Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
|
||||
"((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
|
||||
|
||||
// . Digits ExponentPart_opt FloatTypeSuffix_opt
|
||||
"(\\.("+Digits+")("+Exp+")?)|"+
|
||||
|
||||
// Hexadecimal strings
|
||||
"((" +
|
||||
// 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "(\\.)?)|" +
|
||||
|
||||
// 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
|
||||
|
||||
")[pP][+-]?" + Digits + "))" +
|
||||
"[fFdD]?))" +
|
||||
"[\\x00-\\x20]*");// Optional trailing "whitespace"
|
||||
|
||||
return java.util.regex.Pattern.matches(fpRegex, getText());
|
||||
}
|
||||
|
||||
/** Sets a double-value into the JNumberField. */
|
||||
public void setDouble(double d) {
|
||||
setText(String.valueOf(d));
|
||||
}
|
||||
|
||||
/** Sets a double-value with N digits into the JNumberField. */
|
||||
public void setDouble(double d, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", d));
|
||||
}
|
||||
|
||||
/** Sets a float-value into the JNumberField. */
|
||||
public void setFloat(float f) {
|
||||
setText(String.valueOf(f));
|
||||
}
|
||||
|
||||
/** Sets a float-value with N digits into the JNumberField. */
|
||||
public void setFloat(float f, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", f));
|
||||
}
|
||||
|
||||
/** Sets an int-value into the JNumberField. */
|
||||
public void setInt(int i) {
|
||||
setText(String.valueOf(i));
|
||||
}
|
||||
|
||||
/** Sets a long-value into the JNumberField. */
|
||||
public void setLong(long l) {
|
||||
setText(String.valueOf(l));
|
||||
}
|
||||
|
||||
/** Clears the JNumberField */
|
||||
public void clear() {
|
||||
setText("");
|
||||
}
|
||||
|
||||
protected void processKeyEvent(KeyEvent e) {
|
||||
super.processKeyEvent(e);
|
||||
if (isNumeric() || getText().equals("-") ||
|
||||
getText().equals("") || getText().equals("."))
|
||||
setBackground(Color.white);
|
||||
else
|
||||
setBackground(Color.red);
|
||||
}
|
||||
|
||||
}
|
||||
51
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/Spieler.java
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers fuer das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz fuer das nuechste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
118
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/Spielleitung.java
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter fuer das Wuerfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Wuerfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel wuerfel0; // Referenz auf die Wuerfel
|
||||
private Wuerfel wuerfel1;
|
||||
private int amZug=0; // Welcher Spieler hat die Wuerfel?
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter fuer Spielleitung. Es werden auch die notwendigen zwei Wuerfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel0 = new Wuerfel(); // Wuerfel erzeugen
|
||||
this.wuerfel1 = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darueber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Wuerfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel0.getWurf()==6 && wuerfel1.getWurf()==6) return true;
|
||||
if (wuerfel0.getWurf()==5 && wuerfel1.getWurf()==5) return true;
|
||||
if (wuerfel0.getWurf()==3 && wuerfel1.getWurf()==3) return true;
|
||||
if (wuerfel0.getWurf()==6 && wuerfel1.getWurf()==5) return true;
|
||||
if (wuerfel0.getWurf()==5 && wuerfel1.getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Wuerfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel0.getWurf()==1 && wuerfel1.getWurf()==1) return true;
|
||||
if (wuerfel0.getWurf()==2 && wuerfel1.getWurf()==2) return true;
|
||||
if (wuerfel0.getWurf()==4 && wuerfel1.getWurf()==4) return true;
|
||||
if (wuerfel0.getWurf()==1 && wuerfel1.getWurf()==2) return true;
|
||||
if (wuerfel0.getWurf()==2 && wuerfel1.getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Wuerfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler ueber ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Wuerfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Wuerfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nuechste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Wuerfel
|
||||
* @param nr Nummer des gewuenschten Wuerfels
|
||||
* @return Referenz auf den Wuerfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
if (nr == 0) {
|
||||
return wuerfel0;
|
||||
} else {
|
||||
return wuerfel1;
|
||||
} // end of if
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewuenschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
89
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/Testen.java
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
*
|
||||
* Beschreibung
|
||||
* Testklasse, um die einzelnen Funktionen der Klassen fuer die 3D-Grafik zu testen.
|
||||
*
|
||||
* @version 1.0 vom 10.04.2011
|
||||
* @author Schaller
|
||||
*/
|
||||
|
||||
public class Testen {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Spieler s = new Spieler(102);
|
||||
System.out.println("Spieler erzeugt.");
|
||||
if (s.getGuthaben()!=102) {
|
||||
System.out.println("Guthaben des Spielers wird im Konstruktor nicht richtig gesetzt.");
|
||||
} else {
|
||||
System.out.println("Guthaben des Spielers wird im Konstruktor korrekt gesetzt.");
|
||||
}// end of if
|
||||
s.setze(32);
|
||||
if (s.getGuthaben()!=70) {
|
||||
System.out.println("Methode setze funktioniert nicht richtig. Das Guthaben sollte reduziert werden.");
|
||||
} else {
|
||||
System.out.println("Methode setzt passt Guthaben korrekt an.");
|
||||
}// end of if
|
||||
s.gewonnen();
|
||||
if (s.getGuthaben()!=134) {
|
||||
System.out.println("Methode gewonnen oder Methode setze funktioniert nicht richtig. Nach dem Gewinn ist das Guthaben nicht um den Einsatz erhueht.");
|
||||
} else {
|
||||
System.out.println("Methode gewonnen funktioniert richtig.");
|
||||
} // end of if
|
||||
s.setze(54);
|
||||
if (s.getGuthaben()!=80) {
|
||||
System.out.println("Methode setze funktioniert nicht richtig. Das Guthaben sollte reduziert werden.");
|
||||
} else {
|
||||
System.out.println("Methode setzt passt Guthaben korrekt an.");
|
||||
}// end of if
|
||||
s.verloren();
|
||||
if (s.getGuthaben()!=80) {
|
||||
System.out.println("Methode verloren oder Methode setze funktioniert nicht richtig. Nach dem Verlust ist das Guthaben nicht um den Einsatz reduziert.");
|
||||
} else {
|
||||
System.out.println("Methode verloren funktioniert richtig.");
|
||||
} // end of if
|
||||
|
||||
//---- Wuerfel testen -------------------
|
||||
Wuerfel w = new Wuerfel();
|
||||
int[] anzahl = new int[6];
|
||||
for (int i=0; i<6 ;i++ ) {
|
||||
anzahl[i] =0;
|
||||
} // end of for
|
||||
|
||||
for (int i=0; i <60000; i++ ) {
|
||||
w.wuerfeln();
|
||||
anzahl[w.getWurf()-1]++;
|
||||
} // end of for
|
||||
|
||||
System.out.println("60000 mal Wuerfel brachte folgendes Ergebnis:");
|
||||
for (int i=0; i<6 ; i++ ) {
|
||||
System.out.println(""+anzahl[i]+" Mal wurde "+(i+1)+" gewuerfelt.");
|
||||
} // end of for
|
||||
System.out.println("Falls nicht jede Zahl etwa 10000 mal gewuerfelt wurde, stimmt der Wuerfel nicht");
|
||||
|
||||
// ---- Spielleitung testen ---------
|
||||
|
||||
Spielleitung sl = new Spielleitung();
|
||||
if (sl.getWuerfel(0) == null || sl.getWuerfel(1) == null) {
|
||||
System.out.println("Fehler: Wuerfel werden nicht im Konstruktor von Spielleitung erzeugt.");
|
||||
} // end of if
|
||||
if (!(sl.getWuerfel(0) instanceof Wuerfel) || !(sl.getWuerfel(1) instanceof Wuerfel)) {
|
||||
System.out.println("Fehler: Wuerfel werden nicht im Konstruktor von Spielleitung erzeugt.");
|
||||
} // end of if
|
||||
|
||||
Spieler s1 = new Spieler(102);
|
||||
Spieler s2 = new Spieler(103);
|
||||
Spieler s3 = new Spieler(104);
|
||||
sl.addSpieler(s1);
|
||||
sl.addSpieler(s2);
|
||||
sl.addSpieler(s3);
|
||||
if (sl.getSpieler(0)!=s1 || sl.getSpieler(1)!=s2) {
|
||||
System.out.println("Fehler: Spieler werden nicht korrekt mit addSpieler hinzugefuegt.");
|
||||
} else {
|
||||
System.out.println("addSpieler fuegt Spieler korrekt hinzu.");
|
||||
}// end of if
|
||||
if (sl.getSpielerAmZug()!=s1) {
|
||||
System.out.println("Fehler: Am Anfang sollte der 1. Spieler der aktuelle Spieler sein.");
|
||||
} // end of if
|
||||
|
||||
}
|
||||
}
|
||||
40
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/Wuerfel.java
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Wuerfel fuer Wuerfelspiele bereit. Per Zufall wird jeweils der nuechste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse fuer Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Wuerfel und wuerfelt ein erstes Mal, um eine zufuellige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Wuerfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Wuerfelt den Wuerfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
42
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/WuerfelPanel.java
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import javax.swing.JPanel;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Anzeigen zweier Wuerfel fuer Wuerfelspiele.
|
||||
* Je nach Augenzahl der letzten Wuerfelergebnisse werden die Bilder wuerfel_1.gif - wuerfel_6.gif angezeigt.
|
||||
*
|
||||
* @version 1.0 vom 16.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class WuerfelPanel extends JPanel {
|
||||
// Anfang Attribute
|
||||
private Image[] bilder = new Image[6]; // Referenz auf die Wuerfelbilder wuerfel_x.gif
|
||||
private Wuerfel wuerfel1, wuerfel2; // Referenz auf die anzuzeigenden Wuerfel
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt ein Anzeigepanel fuer zwei Wuerfel.
|
||||
* @param w1 1. Wuerfel
|
||||
* @param w2 2. Wuerfel
|
||||
*/
|
||||
public WuerfelPanel(Wuerfel w1, Wuerfel w2) {;
|
||||
this.wuerfel1 = w1;
|
||||
this.wuerfel2 = w2;
|
||||
// Bilder laden
|
||||
for (int i = 0; i <6 ; i++ ) {
|
||||
bilder[i] = Toolkit.getDefaultToolkit().getImage("wuerfel_"+(i+1)+".gif");
|
||||
} // end of for
|
||||
this.setBackground(Color.white);
|
||||
}
|
||||
|
||||
/** Zeichnet das Panel. Angezeigt werden die Bilder fuer die zwei Augenzahlen der beiden Wuerfel.
|
||||
* Diese Methode wird automatisch von Java aufgerufen.
|
||||
* @param g Grafikkontext auf dem gezeichnet werden soll.
|
||||
*/
|
||||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
g.drawImage(bilder[wuerfel1.getWurf()-1],45,40,Color.white,this);
|
||||
g.drawImage(bilder[wuerfel2.getWurf()-1],105,40,Color.white,this);
|
||||
}
|
||||
|
||||
} // end of Board
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Bilder von Würfel:
|
||||
eigenes Werk (Schaller, 2012)
|
||||
107
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/package.bluej
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
#BlueJ package file
|
||||
dependency1.from=BarbudiGUI
|
||||
dependency1.to=Spielleitung
|
||||
dependency1.type=UsesDependency
|
||||
dependency2.from=BarbudiGUI
|
||||
dependency2.to=WuerfelPanel
|
||||
dependency2.type=UsesDependency
|
||||
dependency3.from=BarbudiGUI
|
||||
dependency3.to=Spieler
|
||||
dependency3.type=UsesDependency
|
||||
dependency4.from=Spielleitung
|
||||
dependency4.to=Spieler
|
||||
dependency4.type=UsesDependency
|
||||
dependency5.from=Spielleitung
|
||||
dependency5.to=Wuerfel
|
||||
dependency5.type=UsesDependency
|
||||
dependency6.from=Testen
|
||||
dependency6.to=Spieler
|
||||
dependency6.type=UsesDependency
|
||||
dependency7.from=Testen
|
||||
dependency7.to=Wuerfel
|
||||
dependency7.type=UsesDependency
|
||||
dependency8.from=Testen
|
||||
dependency8.to=Spielleitung
|
||||
dependency8.type=UsesDependency
|
||||
dependency9.from=WuerfelPanel
|
||||
dependency9.to=Wuerfel
|
||||
dependency9.type=UsesDependency
|
||||
editor.fx.0.height=0
|
||||
editor.fx.0.width=0
|
||||
editor.fx.0.x=0
|
||||
editor.fx.0.y=0
|
||||
objectbench.height=93
|
||||
objectbench.width=680
|
||||
package.divider.horizontal=0.6
|
||||
package.divider.vertical=0.8220640569395018
|
||||
package.editor.height=455
|
||||
package.editor.width=558
|
||||
package.editor.x=204
|
||||
package.editor.y=177
|
||||
package.frame.height=663
|
||||
package.frame.width=704
|
||||
package.numDependencies=9
|
||||
package.numTargets=8
|
||||
package.showExtends=true
|
||||
package.showUses=true
|
||||
project.charset=UTF-8
|
||||
readme.height=60
|
||||
readme.name=@README
|
||||
readme.width=49
|
||||
readme.x=10
|
||||
readme.y=10
|
||||
target1.height=70
|
||||
target1.name=WuerfelPanel
|
||||
target1.showInterface=false
|
||||
target1.type=ClassTarget
|
||||
target1.width=120
|
||||
target1.x=10
|
||||
target1.y=90
|
||||
target2.height=70
|
||||
target2.name=Testen
|
||||
target2.showInterface=false
|
||||
target2.type=ClassTarget
|
||||
target2.width=120
|
||||
target2.x=400
|
||||
target2.y=190
|
||||
target3.height=70
|
||||
target3.name=Spielleitung
|
||||
target3.showInterface=false
|
||||
target3.type=ClassTarget
|
||||
target3.width=120
|
||||
target3.x=230
|
||||
target3.y=250
|
||||
target4.height=70
|
||||
target4.name=Spieler
|
||||
target4.showInterface=false
|
||||
target4.type=ClassTarget
|
||||
target4.width=120
|
||||
target4.x=320
|
||||
target4.y=350
|
||||
target5.height=70
|
||||
target5.name=Wuerfel
|
||||
target5.showInterface=false
|
||||
target5.type=ClassTarget
|
||||
target5.width=120
|
||||
target5.x=90
|
||||
target5.y=350
|
||||
target6.height=70
|
||||
target6.name=bildquellen.txt
|
||||
target6.type=TextTarget
|
||||
target6.width=120
|
||||
target6.x=130
|
||||
target6.y=10
|
||||
target7.height=70
|
||||
target7.name=BarbudiGUI
|
||||
target7.showInterface=false
|
||||
target7.type=ClassTarget
|
||||
target7.width=120
|
||||
target7.x=140
|
||||
target7.y=150
|
||||
target8.height=70
|
||||
target8.name=JNumberField
|
||||
target8.showInterface=false
|
||||
target8.type=ClassTarget
|
||||
target8.width=120
|
||||
target8.x=10
|
||||
target8.y=170
|
||||
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_1.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_2.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_3.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_4.gif
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_5.gif
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
Quellcodes/alg_oo_barbudi/01_Barbudi_Loes/wuerfel_6.gif
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_00/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Files]
|
||||
File0=Wuerfel.java
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=20
|
||||
Y=40
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_01/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
[Files]
|
||||
File0=Spieler.java
|
||||
File1=Wuerfel.java
|
||||
|
||||
[Box: - Spieler]
|
||||
X=20
|
||||
Y=40
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=258
|
||||
Y=41
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_02/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
[Files]
|
||||
File0=Spieler.java
|
||||
File1=Spielleitung.java
|
||||
File2=Wuerfel.java
|
||||
|
||||
[Box: - Spieler]
|
||||
X=40
|
||||
Y=196
|
||||
MinVis=0
|
||||
|
||||
[Object: - spieler1]
|
||||
X=5
|
||||
Y=396
|
||||
MinVis=0
|
||||
Name=spieler1
|
||||
Typ=Spieler
|
||||
|
||||
[Object: - spieler2]
|
||||
X=157
|
||||
Y=396
|
||||
MinVis=0
|
||||
Name=spieler2
|
||||
Typ=Spieler
|
||||
|
||||
[Object: - spielleitung]
|
||||
X=317
|
||||
Y=394
|
||||
MinVis=0
|
||||
Name=spielleitung
|
||||
Typ=Spielleitung
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=293
|
||||
Y=165
|
||||
MinVis=0
|
||||
|
||||
[Object: - unbenanntArrayList1]
|
||||
X=286
|
||||
Y=504
|
||||
MinVis=0
|
||||
Name=unbenanntArrayList1
|
||||
Typ=java.util.ArrayList
|
||||
|
||||
[Object: - unbenanntWuerfel1]
|
||||
X=240
|
||||
Y=44
|
||||
MinVis=0
|
||||
Name=unbenanntWuerfel1
|
||||
Typ=Wuerfel
|
||||
|
||||
[Object: - unbenanntWuerfel2]
|
||||
X=499
|
||||
Y=47
|
||||
MinVis=0
|
||||
Name=unbenanntWuerfel2
|
||||
Typ=Wuerfel
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=571
|
||||
Y=214
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=Spielleitung#Spieler#AssociationDirected#1##n#0#0#
|
||||
V1=Spielleitung#Wuerfel#Aggregation#1##m#0#0#
|
||||
V2=spieler1#Spieler#InstanceOf####0#0#
|
||||
V3=spieler2#Spieler#InstanceOf####0#0#
|
||||
V4=spielleitung#Spielleitung#InstanceOf####0#0#
|
||||
V5=unbenanntWuerfel1#Wuerfel#InstanceOf####0#0#
|
||||
V6=unbenanntWuerfel2#Wuerfel#InstanceOf####0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
I1=Spieler spieler1 = new Spieler(100);
|
||||
I2=Spieler spieler2 = new Spieler(100);
|
||||
I3=Spielleitung spielleitung = new Spielleitung();
|
||||
I4=spielleitung.addSpieler(spieler1);
|
||||
I5=spielleitung.addSpieler(spieler2);
|
||||
I6=spielleitung.wuerfeln();
|
||||
I7=spieler1.setze(10);
|
||||
I8=spieler2.setze(10);
|
||||
I9=spielleitung.wuerfeln();
|
||||
I10=spieler1.gewonnen();
|
||||
I11=spieler1.setze(10);
|
||||
I12=spielleitung.gewinnwurf();
|
||||
I13=spielleitung.verlustwurf();
|
||||
I14=spielleitung.auswerten();
|
||||
I15=Spieler spieler1 = new Spieler(100);
|
||||
I16=Spieler spieler2 = new Spieler(100);
|
||||
I17=Spielleitung spielleitung = new Spielleitung();
|
||||
I18=unbenanntWuerfel1.wuerfeln();
|
||||
I19=unbenanntWuerfel2.wuerfeln();
|
||||
I20=spieler1.setze(10);
|
||||
I21=spieler2.setze(10);
|
||||
I22=unbenanntWuerfel1.wuerfeln();
|
||||
I23=unbenanntWuerfel2.wuerfeln();
|
||||
I24=spielleitung.gewinnwurf();
|
||||
I25=spielleitung.verlustwurf();
|
||||
I26=spielleitung.auswerten();
|
||||
I27=spielleitung.addSpieler(spieler1);
|
||||
I28=spielleitung.addSpieler(spieler2);
|
||||
I29=unbenanntWuerfel1.wuerfeln();
|
||||
I30=unbenanntWuerfel2.wuerfeln();
|
||||
I31=spielleitung.gewinnwurf();
|
||||
I32=spielleitung.verlustwurf();
|
||||
I33=spielleitung.auswerten();
|
||||
|
||||
[Window]
|
||||
Left=225
|
||||
Top=225
|
||||
Width=882
|
||||
Height=728
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter für das Würfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel[] wuerfel = new Wuerfel[2]; // Referenz auf die Würfel
|
||||
private int amZug=0; // Nummer des Spielers der am Zug ist
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel[0] = new Wuerfel(); // Würfel erzeugen
|
||||
this.wuerfel[1] = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==6) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==3 && wuerfel[1].getWurf()==3) return true;
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==1) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==4 && wuerfel[1].getWurf()==4) return true;
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler über ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nächste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Würfel
|
||||
* @param nr Nummer des gewünschten Würfels
|
||||
* @return Referenz auf den Würfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
return wuerfel[nr];
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewünschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_03/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
[Files]
|
||||
File0=Spieler.java
|
||||
File1=Spielleitung.java
|
||||
File2=Testen.java
|
||||
File3=Wuerfel.java
|
||||
|
||||
[Box: - Spieler]
|
||||
X=20
|
||||
Y=313
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=90
|
||||
Y=40
|
||||
MinVis=0
|
||||
|
||||
[Box: - Testen]
|
||||
X=163
|
||||
Y=569
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=232
|
||||
Y=348
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=Spielleitung#Spieler#Aggregation####0#0#
|
||||
V1=Spielleitung#Wuerfel#Aggregation####0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter für das Würfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel[] wuerfel = new Wuerfel[2]; // Referenz auf die Würfel
|
||||
private int amZug=0; // Nummer des Spielers der am Zug ist
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel[0] = new Wuerfel(); // Würfel erzeugen
|
||||
this.wuerfel[1] = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==6) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==3 && wuerfel[1].getWurf()==3) return true;
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==1) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==4 && wuerfel[1].getWurf()==4) return true;
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler über ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nächste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Würfel
|
||||
* @param nr Nummer des gewünschten Würfels
|
||||
* @return Referenz auf den Würfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
return wuerfel[nr];
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewünschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
public void wuerfeln() {
|
||||
|
||||
wuerfel[0].wuerfeln();
|
||||
wuerfel[1].wuerfeln();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/**
|
||||
*
|
||||
* Beschreibung
|
||||
* Testklasse, um die einzelnen Funktionen der Klassen für die Barbudi (ohne Grafik) zu testen.
|
||||
*
|
||||
* @version 1.0 vom 10.04.2011
|
||||
* @author Schaller
|
||||
*/
|
||||
|
||||
public class Testen {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Spieler s = new Spieler(102);
|
||||
System.out.println("Spieler erzeugt.");
|
||||
if (s.getGuthaben()!=102) {
|
||||
System.out.println("Guthaben des Spielers wird im Konstruktor nicht richtig gesetzt.");
|
||||
} else {
|
||||
System.out.println("Guthaben des Spielers wird im Konstruktor korrekt gesetzt.");
|
||||
}// end of if
|
||||
s.setze(32);
|
||||
if (s.getGuthaben()!=70) {
|
||||
System.out.println("Methode setze funktioniert nicht richtig. Das Guthaben sollte reduziert werden.");
|
||||
} else {
|
||||
System.out.println("Methode setzt passt Guthaben korrekt an.");
|
||||
}// end of if
|
||||
s.gewonnen();
|
||||
if (s.getGuthaben()!=134) {
|
||||
System.out.println("Methode gewonnen oder Methode setze funktioniert nicht richtig. Nach dem Gewinn ist das Guthaben nicht um den Einsatz erhöht.");
|
||||
} else {
|
||||
System.out.println("Methode gewonnen funktioniert richtig.");
|
||||
} // end of if
|
||||
s.setze(54);
|
||||
if (s.getGuthaben()!=80) {
|
||||
System.out.println("Methode setze funktioniert nicht richtig. Das Guthaben sollte reduziert werden.");
|
||||
} else {
|
||||
System.out.println("Methode setzt passt Guthaben korrekt an.");
|
||||
}// end of if
|
||||
s.verloren();
|
||||
if (s.getGuthaben()!=80) {
|
||||
System.out.println("Methode verloren oder Methode setze funktioniert nicht richtig. Nach dem Verlust ist das Guthaben nicht um den Einsatz reduziert.");
|
||||
} else {
|
||||
System.out.println("Methode verloren funktioniert richtig.");
|
||||
} // end of if
|
||||
|
||||
|
||||
//---- Würfel testen -------------------
|
||||
|
||||
Wuerfel w = new Wuerfel();
|
||||
int[] anzahl = new int[6];
|
||||
for (int i=0; i<6 ;i++ ) {
|
||||
anzahl[i] =0;
|
||||
} // end of for
|
||||
|
||||
for (int i=0; i <60000; i++ ) {
|
||||
w.wuerfeln();
|
||||
anzahl[w.getWurf()-1]++;
|
||||
} // end of for
|
||||
|
||||
System.out.println("60000 mal Würfel brachte folgendes Ergebnis:");
|
||||
for (int i=0; i<6 ; i++ ) {
|
||||
System.out.println(""+anzahl[i]+" Mal wurde "+(i+1)+" gewürfelt.");
|
||||
} // end of for
|
||||
System.out.println("Falls nicht jede Zahl etwa 10000 mal gewürfelt wurde, stimmt der Würfel nicht");
|
||||
|
||||
// ---- Spielleitung testen ---------
|
||||
|
||||
Spielleitung sl = new Spielleitung();
|
||||
if (sl.getWuerfel(0) == null || sl.getWuerfel(1) == null) {
|
||||
System.out.println("Fehler: Würfel werden nicht im Konstruktor von Spielleitung erzeugt.");
|
||||
} // end of if
|
||||
if (!(sl.getWuerfel(0) instanceof Wuerfel) || !(sl.getWuerfel(1) instanceof Wuerfel)) {
|
||||
System.out.println("Fehler: Würfel werden nicht im Konstruktor von Spielleitung erzeugt.");
|
||||
} // end of if
|
||||
|
||||
Spieler s1 = new Spieler(102);
|
||||
Spieler s2 = new Spieler(103);
|
||||
Spieler s3 = new Spieler(104);
|
||||
sl.addSpieler(s1);
|
||||
sl.addSpieler(s2);
|
||||
sl.addSpieler(s3);
|
||||
if (sl.getSpieler(0)!=s1 || sl.getSpieler(1)!=s2) {
|
||||
System.out.println("Fehler: Spieler werden nicht korrekt mit addSpieler hinzugefügt.");
|
||||
} else {
|
||||
System.out.println("addSpieler fügt Spieler korrekt hinzu.");
|
||||
}// end of if
|
||||
if (sl.getSpielerAmZug()!=s1) {
|
||||
System.out.println("Fehler: Am Anfang sollte der 1. Spieler der aktuelle Spieler sein.");
|
||||
} // end of if
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_04/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
[Files]
|
||||
File0=Spieler.java
|
||||
File1=Spielleitung.java
|
||||
File2=Wuerfel.java
|
||||
File3=WuerfelPanel.java
|
||||
|
||||
[Box: - Spieler]
|
||||
X=10
|
||||
Y=314
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=238
|
||||
Y=273
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=502
|
||||
Y=328
|
||||
MinVis=0
|
||||
|
||||
[Box: - WuerfelPanel]
|
||||
X=508
|
||||
Y=82
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=Spielleitung#Spieler#AssociationDirected####0#0#
|
||||
V1=Spielleitung#Wuerfel#Aggregation####0#0#
|
||||
V2=WuerfelPanel#Wuerfel#AssociationDirected####0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter für das Würfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel[] wuerfel = new Wuerfel[2]; // Referenz auf die Würfel
|
||||
private int amZug=0; // Nummer des Spielers der am Zug ist
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel[0] = new Wuerfel(); // Würfel erzeugen
|
||||
this.wuerfel[1] = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==6) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==3 && wuerfel[1].getWurf()==3) return true;
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==1) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==4 && wuerfel[1].getWurf()==4) return true;
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler über ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nächste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Würfel
|
||||
* @param nr Nummer des gewünschten Würfels
|
||||
* @return Referenz auf den Würfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
return wuerfel[nr];
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewünschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
public void wuerfeln() {
|
||||
|
||||
wuerfel[0].wuerfeln();
|
||||
wuerfel[1].wuerfeln();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import javax.swing.JPanel;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.
|
||||
* Je nach Augenzahl der letzten Würfelergebnisse werden die Bilder wuerfel_1.gif - wuerfel_6.gif angezeigt.
|
||||
*
|
||||
* @version 1.0 vom 16.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
|
||||
public class WuerfelPanel extends JPanel {
|
||||
|
||||
// Anfang Attribute
|
||||
private Image[] bilder = new Image[6]; // Referenz auf die Würfelbilder wuerfel_x.gif
|
||||
private Wuerfel wuerfel1, wuerfel2; // Referenz auf die anzuzeigenden Würfel
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt ein Anzeigepanel für zwei Würfel.
|
||||
* @param w1 1. Würfel
|
||||
* @param w2 2. Würfel
|
||||
*/
|
||||
public WuerfelPanel(Wuerfel w1, Wuerfel w2) {;
|
||||
this.wuerfel1 = w1;
|
||||
this.wuerfel2 = w2;
|
||||
// Bilder laden
|
||||
for (int i = 0; i <6 ; i++ ) {
|
||||
bilder[i] = Toolkit.getDefaultToolkit().getImage("wuerfel_"+(i+1)+".gif");
|
||||
} // end of for
|
||||
this.setBackground(Color.white);
|
||||
}
|
||||
|
||||
/** Zeichnet das Panel. Angezeigt werden die Bilder für die zwei Augenzahlen der beiden Würfel.
|
||||
* Diese Methode wird automatisch von Java aufgerufen.
|
||||
* @param g Grafikkontext auf dem gezeichnet werden soll.
|
||||
*/
|
||||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
g.drawImage(bilder[wuerfel1.getWurf()-1],45,40,Color.white,this);
|
||||
g.drawImage(bilder[wuerfel2.getWurf()-1],105,40,Color.white,this);
|
||||
}
|
||||
|
||||
} // end of Board
|
||||
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_05/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
/**
|
||||
* GUI für das Würfelspiel Barbudi
|
||||
* Zwei Spieler können einen Betrag setzen und dann abwechselnd würfeln.
|
||||
* Würfelt einer der Spieler einen Gewinnwurf gewinnt er, der andere verliert.
|
||||
* Bei einem Verlustwurf ist es umgekehrt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class BarbudiGUI extends JFrame {
|
||||
// Anfang Attribute
|
||||
private Spielleitung spielleitung; // Verwaltung des Spiels
|
||||
|
||||
|
||||
private JPanel jPSpieler1 = new JPanel(null, true);
|
||||
private JLabel jLabel1 = new JLabel();
|
||||
private JLabel jLabel2 = new JLabel();
|
||||
private JNumberField jNFSpieler1Guthaben = new JNumberField();
|
||||
private JLabel jLabel3 = new JLabel();
|
||||
private JNumberField jNFSpieler1Einsatz = new JNumberField();
|
||||
private JButton jBSpieler1Setzen = new JButton();
|
||||
private JPanel jPSpieler2 = new JPanel(null, true);
|
||||
private JLabel jLabel21 = new JLabel();
|
||||
private JNumberField jNFSpieler2Guthaben = new JNumberField();
|
||||
private JLabel jLabel31 = new JLabel();
|
||||
private JNumberField jNFSpieler2Einsatz = new JNumberField();
|
||||
private JButton jBSpieler2Setzen = new JButton();
|
||||
private JLabel jLabel11 = new JLabel();
|
||||
private JLabel jLMeldung = new JLabel();
|
||||
private WuerfelPanel wuerfelPanel1;
|
||||
// Ende Attribute
|
||||
|
||||
public BarbudiGUI(String title) {
|
||||
// Frame-Initialisierung
|
||||
super(title);
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
int frameWidth = 653;
|
||||
int frameHeight = 205;
|
||||
setSize(frameWidth, frameHeight);
|
||||
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
int x = (d.width - getSize().width) / 2;
|
||||
int y = (d.height - getSize().height) / 2;
|
||||
setLocation(x, y);
|
||||
setResizable(false);
|
||||
Container cp = getContentPane();
|
||||
cp.setLayout(null);
|
||||
// Anfang Komponenten
|
||||
|
||||
jPSpieler1.setBounds(8, 8, 169, 161);
|
||||
jPSpieler1.setOpaque(true);
|
||||
|
||||
|
||||
cp.add(jPSpieler1);
|
||||
jLabel1.setBounds(8, 8, 110, 20);
|
||||
jLabel1.setText("Spieler 1");
|
||||
jPSpieler1.add(jLabel1);
|
||||
jLabel2.setBounds(8, 40, 70, 20);
|
||||
jNFSpieler1Guthaben.setBounds(86, 40, 75, 20);
|
||||
jLabel3.setBounds(8, 72, 70, 20);
|
||||
jNFSpieler1Einsatz.setBounds(86, 72, 75, 20);
|
||||
jBSpieler1Setzen.setBounds(48, 120, 75, 25);
|
||||
jLabel2.setText("Guthaben");
|
||||
jPSpieler1.add(jLabel2);
|
||||
jNFSpieler1Guthaben.setText("");
|
||||
jNFSpieler1Guthaben.setEditable(false);
|
||||
jPSpieler1.add(jNFSpieler1Guthaben);
|
||||
jLabel3.setText("Einsatz");
|
||||
jPSpieler1.add(jLabel3);
|
||||
jNFSpieler1Einsatz.setText("");
|
||||
jPSpieler1.add(jNFSpieler1Einsatz);
|
||||
jBSpieler1Setzen.setText("setzen");
|
||||
jBSpieler1Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jPSpieler1.add(jBSpieler1Setzen);
|
||||
jPSpieler2.setBounds(456, 8, 185, 161);
|
||||
jPSpieler2.setOpaque(true);
|
||||
cp.add(jPSpieler2);
|
||||
jLabel21.setBounds(16, 40, 70, 20);
|
||||
jNFSpieler2Guthaben.setBounds(96, 40, 75, 20);
|
||||
jLabel31.setBounds(16, 72, 70, 20);
|
||||
jNFSpieler2Einsatz.setBounds(96, 72, 75, 20);
|
||||
jBSpieler2Setzen.setBounds(64, 120, 75, 25);
|
||||
jLabel21.setText("Guthaben");
|
||||
jPSpieler2.add(jLabel21);
|
||||
jNFSpieler2Guthaben.setText("");
|
||||
jNFSpieler2Guthaben.setEditable(false);
|
||||
jPSpieler2.add(jNFSpieler2Guthaben);
|
||||
jLabel31.setText("Einsatz");
|
||||
jPSpieler2.add(jLabel31);
|
||||
jNFSpieler2Einsatz.setText("");
|
||||
jPSpieler2.add(jNFSpieler2Einsatz);
|
||||
jBSpieler2Setzen.setText("setzen");
|
||||
jBSpieler2Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jPSpieler2.add(jBSpieler2Setzen);
|
||||
jLabel11.setBounds(16, 8, 110, 20);
|
||||
jLabel11.setText("Spieler 2");
|
||||
jPSpieler2.add(jLabel11);
|
||||
jLMeldung.setBounds(184, 144, 262, 28);
|
||||
jLMeldung.setText("Bitte machen Sie Ihre Einsätze");
|
||||
jLMeldung.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
jLMeldung.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(jLMeldung);
|
||||
|
||||
// Ende Komponenten
|
||||
|
||||
// Spielleitung Grundaufbau erzeugen (z.B. auch Würfel)
|
||||
spielleitung = new Spielleitung();
|
||||
wuerfelPanel1= new WuerfelPanel(spielleitung.getWuerfel(0),spielleitung.getWuerfel(1));
|
||||
wuerfelPanel1.setBounds(216, 8, 204, 124);
|
||||
cp.add(wuerfelPanel1);
|
||||
|
||||
|
||||
// Informationen über Spieler anzeigen
|
||||
|
||||
setVisible(true);
|
||||
} // end of public BarbudiGUI
|
||||
|
||||
// Anfang Methoden
|
||||
/** Informationen über die Spieler werden angezeigt. Es werden das Guthaben angezeigt
|
||||
* und je nach dem, welche Spieler an der Reihe ist, der Hintergrund dunkler eingefärbt.
|
||||
* Außerdem wird angezeigt, welcher Spieler dran ist.
|
||||
*/
|
||||
|
||||
public void showSpieler() {
|
||||
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BarbudiGUI("BarbudiGUI");
|
||||
} // end of main
|
||||
|
||||
} // end of class BarbudiGUI
|
||||
|
|
@ -0,0 +1,424 @@
|
|||
object barbudiGUI: TFGUIFormular
|
||||
Left = 174
|
||||
Top = 181
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = 'BarbudiGUI'
|
||||
ClientHeight = 177
|
||||
ClientWidth = 647
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -10
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
FormStyle = fsMDIChild
|
||||
OldCreateOrder = True
|
||||
Position = poDesigned
|
||||
Visible = True
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnResize = FormResize
|
||||
FrameType = 5
|
||||
Resizable = False
|
||||
Undecorated = False
|
||||
Background = clBtnFace
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object jPSpieler1: TJPanel
|
||||
Tag = 12
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 169
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clRed
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel1: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 1'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jLabel2: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel3: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler1Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 48
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
end
|
||||
object jPSpieler2: TJPanel
|
||||
Tag = 12
|
||||
Left = 456
|
||||
Top = 8
|
||||
Width = 185
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel21: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel31: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler2Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 64
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
object jLabel11: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 2'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
end
|
||||
object jLMeldung: TJLabel
|
||||
Tag = 1
|
||||
Left = 184
|
||||
Top = 144
|
||||
Width = 262
|
||||
Height = 28
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Bitte machen Sie Ihre Eins'#228'tze'
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = CENTER
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object wuerfelPanel1: TJPanel
|
||||
Tag = 38
|
||||
Left = 216
|
||||
Top = 8
|
||||
Width = 204
|
||||
Height = 124
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
[Files]
|
||||
File0=BarbudiGUI.java
|
||||
File1=Spieler.java
|
||||
File2=Spielleitung.java
|
||||
File3=Wuerfel.java
|
||||
File4=WuerfelPanel.java
|
||||
|
||||
[Box: - BarbudiGUI]
|
||||
X=237
|
||||
Y=32
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spieler]
|
||||
X=42
|
||||
Y=518
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=268
|
||||
Y=479
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=587
|
||||
Y=534
|
||||
MinVis=0
|
||||
|
||||
[Box: - WuerfelPanel]
|
||||
X=593
|
||||
Y=153
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=BarbudiGUI#Spielleitung#Aggregation#1##1#0#0#
|
||||
V1=Spielleitung#Spieler#AssociationDirected#1##n#0#0#
|
||||
V2=Spielleitung#Wuerfel#Aggregation#1##m#0#0#
|
||||
V3=WuerfelPanel#Wuerfel#AssociationDirected#1##2#0#0#
|
||||
V4=BarbudiGUI#WuerfelPanel#Aggregation#1##1#0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
[Window]
|
||||
Left=25
|
||||
Top=25
|
||||
Width=878
|
||||
Height=724
|
||||
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
Swing-component for input and output of numeric values.
|
||||
*/
|
||||
|
||||
public class JNumberField extends JTextField {
|
||||
|
||||
/** constructor for a JNumberField */
|
||||
public JNumberField() {
|
||||
enableEvents(AWTEvent.KEY_EVENT_MASK);
|
||||
}
|
||||
|
||||
/** Gets a double-value from the JNumberField. */
|
||||
public double getDouble() {
|
||||
Double d = new Double(getText());
|
||||
return d.doubleValue();
|
||||
}
|
||||
|
||||
/** Gets a float-value from the JNumberField. */
|
||||
public float getFloat() {
|
||||
Double d = new Double(getText());
|
||||
return d.floatValue();
|
||||
}
|
||||
|
||||
/** Gets an int-value from the JNumberField. */
|
||||
public int getInt() {
|
||||
Double d = new Double(getText());
|
||||
return d.intValue();
|
||||
}
|
||||
|
||||
/** Gets a long-value from the JNumberField. */
|
||||
public long getLong() {
|
||||
Double d = new Double(getText());
|
||||
return d.longValue();
|
||||
}
|
||||
|
||||
/** Checks wether the JNumberField contains a valid numeric value. */
|
||||
public boolean isNumeric() {
|
||||
final String Digits = "(\\p{Digit}+)";
|
||||
final String HexDigits = "(\\p{XDigit}+)";
|
||||
// an exponent is 'e' or 'E' followed by an optionally
|
||||
// signed decimal integer.
|
||||
final String Exp = "[eE][+-]?"+Digits;
|
||||
final String fpRegex =
|
||||
("[\\x00-\\x20]*"+ // Optional leading "whitespace"
|
||||
"[+-]?(" + // Optional sign character
|
||||
"NaN|" + // "NaN" string
|
||||
"Infinity|" + // "Infinity" string
|
||||
|
||||
// A decimal floating-point string representing a finite positive
|
||||
// number without a leading sign has at most five basic pieces:
|
||||
// Digits . Digits ExponentPart FloatTypeSuffix
|
||||
//
|
||||
// Since this method allows integer-only strings as input
|
||||
// in addition to strings of floating-point literals, the
|
||||
// two sub-patterns below are simplifications of the grammar
|
||||
// productions from the Java Language Specification, 2nd
|
||||
// edition, section 3.10.2.
|
||||
|
||||
// Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
|
||||
"((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
|
||||
|
||||
// . Digits ExponentPart_opt FloatTypeSuffix_opt
|
||||
"(\\.("+Digits+")("+Exp+")?)|"+
|
||||
|
||||
// Hexadecimal strings
|
||||
"((" +
|
||||
// 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "(\\.)?)|" +
|
||||
|
||||
// 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
|
||||
|
||||
")[pP][+-]?" + Digits + "))" +
|
||||
"[fFdD]?))" +
|
||||
"[\\x00-\\x20]*");// Optional trailing "whitespace"
|
||||
|
||||
return java.util.regex.Pattern.matches(fpRegex, getText());
|
||||
}
|
||||
|
||||
/** Sets a double-value into the JNumberField. */
|
||||
public void setDouble(double d) {
|
||||
setText(String.valueOf(d));
|
||||
}
|
||||
|
||||
/** Sets a double-value with N digits into the JNumberField. */
|
||||
public void setDouble(double d, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", d));
|
||||
}
|
||||
|
||||
/** Sets a float-value into the JNumberField. */
|
||||
public void setFloat(float f) {
|
||||
setText(String.valueOf(f));
|
||||
}
|
||||
|
||||
/** Sets a float-value with N digits into the JNumberField. */
|
||||
public void setFloat(float f, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", f));
|
||||
}
|
||||
|
||||
/** Sets an int-value into the JNumberField. */
|
||||
public void setInt(int i) {
|
||||
setText(String.valueOf(i));
|
||||
}
|
||||
|
||||
/** Sets a long-value into the JNumberField. */
|
||||
public void setLong(long l) {
|
||||
setText(String.valueOf(l));
|
||||
}
|
||||
|
||||
/** Clears the JNumberField */
|
||||
public void clear() {
|
||||
setText("");
|
||||
}
|
||||
|
||||
protected void processKeyEvent(KeyEvent e) {
|
||||
super.processKeyEvent(e);
|
||||
if (isNumeric() || getText().equals("-") ||
|
||||
getText().equals("") || getText().equals("."))
|
||||
setBackground(Color.white);
|
||||
else
|
||||
setBackground(Color.red);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter für das Würfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel[] wuerfel = new Wuerfel[2]; // Referenz auf die Würfel
|
||||
private int amZug=0; // Nummer des Spielers der am Zug ist
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel[0] = new Wuerfel(); // Würfel erzeugen
|
||||
this.wuerfel[1] = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==6) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==3 && wuerfel[1].getWurf()==3) return true;
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==1) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==4 && wuerfel[1].getWurf()==4) return true;
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler über ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nächste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Würfel
|
||||
* @param nr Nummer des gewünschten Würfels
|
||||
* @return Referenz auf den Würfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
return wuerfel[nr];
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewünschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
public void wuerfeln() {
|
||||
|
||||
wuerfel[0].wuerfeln();
|
||||
wuerfel[1].wuerfeln();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import javax.swing.JPanel;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.
|
||||
* Je nach Augenzahl der letzten Würfelergebnisse werden die Bilder wuerfel_1.gif - wuerfel_6.gif angezeigt.
|
||||
*
|
||||
* @version 1.0 vom 16.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
|
||||
public class WuerfelPanel extends JPanel {
|
||||
|
||||
// Anfang Attribute
|
||||
private Image[] bilder = new Image[6]; // Referenz auf die Würfelbilder wuerfel_x.gif
|
||||
private Wuerfel wuerfel1, wuerfel2; // Referenz auf die anzuzeigenden Würfel
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt ein Anzeigepanel für zwei Würfel.
|
||||
* @param w1 1. Würfel
|
||||
* @param w2 2. Würfel
|
||||
*/
|
||||
public WuerfelPanel(Wuerfel w1, Wuerfel w2) {;
|
||||
this.wuerfel1 = w1;
|
||||
this.wuerfel2 = w2;
|
||||
// Bilder laden
|
||||
for (int i = 0; i <6 ; i++ ) {
|
||||
bilder[i] = Toolkit.getDefaultToolkit().getImage("wuerfel_"+(i+1)+".gif");
|
||||
} // end of for
|
||||
this.setBackground(Color.white);
|
||||
}
|
||||
|
||||
/** Zeichnet das Panel. Angezeigt werden die Bilder für die zwei Augenzahlen der beiden Würfel.
|
||||
* Diese Methode wird automatisch von Java aufgerufen.
|
||||
* @param g Grafikkontext auf dem gezeichnet werden soll.
|
||||
*/
|
||||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
g.drawImage(bilder[wuerfel1.getWurf()-1],45,40,Color.white,this);
|
||||
g.drawImage(bilder[wuerfel2.getWurf()-1],105,40,Color.white,this);
|
||||
}
|
||||
|
||||
} // end of Board
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
6
Quellcodes/alg_oo_barbudi/02_Barbudi_Kleinschrittig/03_Barbudi_06/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*.sh
|
||||
*.class
|
||||
*.ctxt
|
||||
repo.adoc
|
||||
repo_subtree.adoc
|
||||
/alt
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
/**
|
||||
* GUI für das Würfelspiel Barbudi
|
||||
* Zwei Spieler können einen Betrag setzen und dann abwechselnd würfeln.
|
||||
* Würfelt einer der Spieler einen Gewinnwurf gewinnt er, der andere verliert.
|
||||
* Bei einem Verlustwurf ist es umgekehrt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class BarbudiGUI extends JFrame {
|
||||
// Anfang Attribute
|
||||
private Spielleitung spielleitung; // Verwaltung des Spiels
|
||||
|
||||
|
||||
private JPanel jPSpieler1 = new JPanel(null, true);
|
||||
private JLabel jLabel1 = new JLabel();
|
||||
private JLabel jLabel2 = new JLabel();
|
||||
private JNumberField jNFSpieler1Guthaben = new JNumberField();
|
||||
private JLabel jLabel3 = new JLabel();
|
||||
private JNumberField jNFSpieler1Einsatz = new JNumberField();
|
||||
private JButton jBSpieler1Setzen = new JButton();
|
||||
private JPanel jPSpieler2 = new JPanel(null, true);
|
||||
private JLabel jLabel21 = new JLabel();
|
||||
private JNumberField jNFSpieler2Guthaben = new JNumberField();
|
||||
private JLabel jLabel31 = new JLabel();
|
||||
private JNumberField jNFSpieler2Einsatz = new JNumberField();
|
||||
private JButton jBSpieler2Setzen = new JButton();
|
||||
private JLabel jLabel11 = new JLabel();
|
||||
private JLabel jLMeldung = new JLabel();
|
||||
private WuerfelPanel wuerfelPanel1;
|
||||
// Ende Attribute
|
||||
|
||||
public BarbudiGUI(String title) {
|
||||
// Frame-Initialisierung
|
||||
super(title);
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
int frameWidth = 653;
|
||||
int frameHeight = 205;
|
||||
setSize(frameWidth, frameHeight);
|
||||
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
int x = (d.width - getSize().width) / 2;
|
||||
int y = (d.height - getSize().height) / 2;
|
||||
setLocation(x, y);
|
||||
setResizable(false);
|
||||
Container cp = getContentPane();
|
||||
cp.setLayout(null);
|
||||
// Anfang Komponenten
|
||||
|
||||
jPSpieler1.setBounds(8, 8, 169, 161);
|
||||
jPSpieler1.setOpaque(true);
|
||||
|
||||
|
||||
cp.add(jPSpieler1);
|
||||
jLabel1.setBounds(8, 8, 110, 20);
|
||||
jLabel1.setText("Spieler 1");
|
||||
jPSpieler1.add(jLabel1);
|
||||
jLabel2.setBounds(8, 40, 70, 20);
|
||||
jNFSpieler1Guthaben.setBounds(86, 40, 75, 20);
|
||||
jLabel3.setBounds(8, 72, 70, 20);
|
||||
jNFSpieler1Einsatz.setBounds(86, 72, 75, 20);
|
||||
jBSpieler1Setzen.setBounds(48, 120, 75, 25);
|
||||
jLabel2.setText("Guthaben");
|
||||
jPSpieler1.add(jLabel2);
|
||||
jNFSpieler1Guthaben.setText("");
|
||||
jNFSpieler1Guthaben.setEditable(false);
|
||||
jPSpieler1.add(jNFSpieler1Guthaben);
|
||||
jLabel3.setText("Einsatz");
|
||||
jPSpieler1.add(jLabel3);
|
||||
jNFSpieler1Einsatz.setText("");
|
||||
jPSpieler1.add(jNFSpieler1Einsatz);
|
||||
jBSpieler1Setzen.setText("setzen");
|
||||
jBSpieler1Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jBSpieler1Setzen.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
jBSpieler1Setzen_ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPSpieler1.add(jBSpieler1Setzen);
|
||||
jPSpieler2.setBounds(456, 8, 185, 161);
|
||||
jPSpieler2.setOpaque(true);
|
||||
cp.add(jPSpieler2);
|
||||
jLabel21.setBounds(16, 40, 70, 20);
|
||||
jNFSpieler2Guthaben.setBounds(96, 40, 75, 20);
|
||||
jLabel31.setBounds(16, 72, 70, 20);
|
||||
jNFSpieler2Einsatz.setBounds(96, 72, 75, 20);
|
||||
jBSpieler2Setzen.setBounds(64, 120, 75, 25);
|
||||
jLabel21.setText("Guthaben");
|
||||
jPSpieler2.add(jLabel21);
|
||||
jNFSpieler2Guthaben.setText("");
|
||||
jNFSpieler2Guthaben.setEditable(false);
|
||||
jPSpieler2.add(jNFSpieler2Guthaben);
|
||||
jLabel31.setText("Einsatz");
|
||||
jPSpieler2.add(jLabel31);
|
||||
jNFSpieler2Einsatz.setText("");
|
||||
jPSpieler2.add(jNFSpieler2Einsatz);
|
||||
jBSpieler2Setzen.setText("setzen");
|
||||
jBSpieler2Setzen.setMargin(new Insets(2, 2, 2, 2));
|
||||
jBSpieler2Setzen.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
jBSpieler2Setzen_ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPSpieler2.add(jBSpieler2Setzen);
|
||||
jLabel11.setBounds(16, 8, 110, 20);
|
||||
jLabel11.setText("Spieler 2");
|
||||
jPSpieler2.add(jLabel11);
|
||||
jLMeldung.setBounds(184, 144, 262, 28);
|
||||
jLMeldung.setText("Bitte machen Sie Ihre Einsätze");
|
||||
jLMeldung.setHorizontalTextPosition(SwingConstants.CENTER);
|
||||
jLMeldung.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(jLMeldung);
|
||||
|
||||
// Ende Komponenten
|
||||
|
||||
// Spielleitung Grundaufbau erzeugen (z.B. auch Würfel)
|
||||
spielleitung = new Spielleitung();
|
||||
wuerfelPanel1= new WuerfelPanel(spielleitung.getWuerfel(0),spielleitung.getWuerfel(1));
|
||||
wuerfelPanel1.setBounds(216, 8, 204, 124);
|
||||
wuerfelPanel1.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent evt) {
|
||||
wuerfelPanel1_MouseClicked(evt);
|
||||
}
|
||||
});
|
||||
cp.add(wuerfelPanel1);
|
||||
|
||||
// Zwei Spieler mit Startguthaben von 100 erzeugen
|
||||
Spieler sp1 = new Spieler(100);
|
||||
Spieler sp2 = new Spieler(100);
|
||||
|
||||
// Spieler bei der Spielleitung anmelden
|
||||
spielleitung.addSpieler(sp1);
|
||||
spielleitung.addSpieler(sp2);
|
||||
|
||||
// Informationen über Spieler anzeigen
|
||||
|
||||
setVisible(true);
|
||||
} // end of public BarbudiGUI
|
||||
|
||||
// Anfang Methoden
|
||||
/** Informationen über die Spieler werden angezeigt. Es werden das Guthaben angezeigt
|
||||
* und je nach dem, welche Spieler an der Reihe ist, der Hintergrund dunkler eingefärbt.
|
||||
* Außerdem wird angezeigt, welcher Spieler dran ist.
|
||||
*/
|
||||
|
||||
public void showSpieler() {
|
||||
|
||||
}
|
||||
|
||||
public void jBSpieler1Setzen_ActionPerformed(ActionEvent evt) {
|
||||
// TODO hier Quelltext einfügen
|
||||
} // end of jBSpieler1Setzen_ActionPerformed
|
||||
|
||||
public void jBSpieler2Setzen_ActionPerformed(ActionEvent evt) {
|
||||
// TODO hier Quelltext einfügen
|
||||
} // end of jBSpieler2Setzen_ActionPerformed
|
||||
|
||||
public void wuerfelPanel1_MouseClicked(MouseEvent evt) {
|
||||
// TODO hier Quelltext einfügen
|
||||
} // end of wuerfelPanel1_MouseClicked
|
||||
|
||||
// Ende Methoden
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BarbudiGUI("BarbudiGUI");
|
||||
} // end of main
|
||||
|
||||
} // end of class BarbudiGUI
|
||||
|
|
@ -0,0 +1,427 @@
|
|||
object barbudiGUI: TFGUIFormular
|
||||
Left = 174
|
||||
Top = 181
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
Caption = 'BarbudiGUI'
|
||||
ClientHeight = 177
|
||||
ClientWidth = 647
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -10
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
FormStyle = fsMDIChild
|
||||
OldCreateOrder = True
|
||||
Position = poDesigned
|
||||
Visible = True
|
||||
WindowState = wsMaximized
|
||||
OnClose = FormClose
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnResize = FormResize
|
||||
FrameType = 5
|
||||
Resizable = False
|
||||
Undecorated = False
|
||||
Background = clBtnFace
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object jPSpieler1: TJPanel
|
||||
Tag = 12
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 169
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clRed
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel1: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 1'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jLabel2: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel3: TJLabel
|
||||
Tag = 1
|
||||
Left = 8
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler1Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 86
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler1Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 48
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
actionPerformed = 'jBSpieler1Setzen_ActionPerformed'
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
end
|
||||
object jPSpieler2: TJPanel
|
||||
Tag = 12
|
||||
Left = 456
|
||||
Top = 8
|
||||
Width = 185
|
||||
Height = 161
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
object jLabel21: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 40
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Guthaben'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Guthaben: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 40
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = False
|
||||
end
|
||||
object jLabel31: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 72
|
||||
Width = 70
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Einsatz'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object jNFSpieler2Einsatz: TJNumberField
|
||||
Tag = 21
|
||||
Left = 96
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 20
|
||||
Cursor = crIBeam
|
||||
Foreground = 3355443
|
||||
Background = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = []
|
||||
HorizontalAlignment = LEFT
|
||||
Editable = True
|
||||
end
|
||||
object jBSpieler2Setzen: TJButton
|
||||
Tag = 4
|
||||
Left = 64
|
||||
Top = 120
|
||||
Width = 75
|
||||
Height = 25
|
||||
Foreground = 3355443
|
||||
Background = 15658734
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
actionPerformed = 'jBSpieler2Setzen_ActionPerformed'
|
||||
Text = 'setzen'
|
||||
Mnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
Selected = False
|
||||
BorderPainted = True
|
||||
FocusPainted = False
|
||||
ContentAreaFilled = True
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
RolloverEnabled = False
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
object jLabel11: TJLabel
|
||||
Tag = 1
|
||||
Left = 16
|
||||
Top = 8
|
||||
Width = 110
|
||||
Height = 20
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Spieler 2'
|
||||
HorizontalAlignment = LEFT
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = RIGHT
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
end
|
||||
object jLMeldung: TJLabel
|
||||
Tag = 1
|
||||
Left = 184
|
||||
Top = 144
|
||||
Width = 262
|
||||
Height = 28
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
Text = 'Bitte machen Sie Ihre Eins'#228'tze'
|
||||
HorizontalAlignment = CENTER
|
||||
VerticalAlignment = CENTER
|
||||
HorizontalTextPosition = CENTER
|
||||
VerticalTextPosition = CENTER
|
||||
IconTextGap = 4
|
||||
DisplayedMnemonic = 0
|
||||
DisplayedMnemonicIndex = 0
|
||||
end
|
||||
object wuerfelPanel1: TJPanel
|
||||
Tag = 38
|
||||
Left = 216
|
||||
Top = 8
|
||||
Width = 204
|
||||
Height = 124
|
||||
HelpKeyword = 'WuerfelPanel'
|
||||
Foreground = 3355443
|
||||
Background = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Dialog'
|
||||
Font.Style = [fsBold]
|
||||
mouseClicked = 'wuerfelPanel1_MouseClicked'
|
||||
Border.BorderType = NoBorder
|
||||
Border.LineColor = clBlack
|
||||
Border.LineThickness = 0
|
||||
Border.LineRounded = False
|
||||
Border.EtchHighlightColor = clBlack
|
||||
Border.EtchShadowColor = clBlack
|
||||
Border.Etchtype = 0
|
||||
Border.BevelHighlightColor = clBlack
|
||||
Border.BevelShadowColor = clBlack
|
||||
Border.Beveltype = 0
|
||||
Border.MatteColor = clBlack
|
||||
Border.MatteTop = 0
|
||||
Border.MatteLeft = 0
|
||||
Border.MatteBottom = 0
|
||||
Border.MatteRight = 0
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
[Files]
|
||||
File0=BarbudiGUI.java
|
||||
File1=Spieler.java
|
||||
File2=Spielleitung.java
|
||||
File3=Wuerfel.java
|
||||
File4=WuerfelPanel.java
|
||||
|
||||
[Box: - BarbudiGUI]
|
||||
X=237
|
||||
Y=32
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spieler]
|
||||
X=42
|
||||
Y=518
|
||||
MinVis=0
|
||||
|
||||
[Box: - Spielleitung]
|
||||
X=268
|
||||
Y=479
|
||||
MinVis=0
|
||||
|
||||
[Box: - Wuerfel]
|
||||
X=587
|
||||
Y=534
|
||||
MinVis=0
|
||||
|
||||
[Box: - WuerfelPanel]
|
||||
X=593
|
||||
Y=175
|
||||
MinVis=0
|
||||
|
||||
[Diagram]
|
||||
OffsetX=0
|
||||
OffsetY=0
|
||||
ShowAssoc=1
|
||||
Visibility=0
|
||||
ShowParameter=0
|
||||
SortOrder=0
|
||||
ShowIcons=0
|
||||
Fontname=MS Sans Serif
|
||||
Fontsize=10
|
||||
|
||||
[Connections]
|
||||
V0=BarbudiGUI#Spielleitung#Aggregation#1##1#0#0#
|
||||
V1=Spielleitung#Spieler#AssociationDirected#1##n#0#0#
|
||||
V2=Spielleitung#Wuerfel#Aggregation#1##m#0#0#
|
||||
V3=WuerfelPanel#Wuerfel#AssociationDirected#1##2#0#0#
|
||||
V4=BarbudiGUI#WuerfelPanel#Aggregation#1##1#0#0#
|
||||
|
||||
[Interactive]
|
||||
I0=
|
||||
|
||||
[Window]
|
||||
Left=75
|
||||
Top=75
|
||||
Width=764
|
||||
Height=722
|
||||
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
Swing-component for input and output of numeric values.
|
||||
*/
|
||||
|
||||
public class JNumberField extends JTextField {
|
||||
|
||||
/** constructor for a JNumberField */
|
||||
public JNumberField() {
|
||||
enableEvents(AWTEvent.KEY_EVENT_MASK);
|
||||
}
|
||||
|
||||
/** Gets a double-value from the JNumberField. */
|
||||
public double getDouble() {
|
||||
Double d = new Double(getText());
|
||||
return d.doubleValue();
|
||||
}
|
||||
|
||||
/** Gets a float-value from the JNumberField. */
|
||||
public float getFloat() {
|
||||
Double d = new Double(getText());
|
||||
return d.floatValue();
|
||||
}
|
||||
|
||||
/** Gets an int-value from the JNumberField. */
|
||||
public int getInt() {
|
||||
Double d = new Double(getText());
|
||||
return d.intValue();
|
||||
}
|
||||
|
||||
/** Gets a long-value from the JNumberField. */
|
||||
public long getLong() {
|
||||
Double d = new Double(getText());
|
||||
return d.longValue();
|
||||
}
|
||||
|
||||
/** Checks wether the JNumberField contains a valid numeric value. */
|
||||
public boolean isNumeric() {
|
||||
final String Digits = "(\\p{Digit}+)";
|
||||
final String HexDigits = "(\\p{XDigit}+)";
|
||||
// an exponent is 'e' or 'E' followed by an optionally
|
||||
// signed decimal integer.
|
||||
final String Exp = "[eE][+-]?"+Digits;
|
||||
final String fpRegex =
|
||||
("[\\x00-\\x20]*"+ // Optional leading "whitespace"
|
||||
"[+-]?(" + // Optional sign character
|
||||
"NaN|" + // "NaN" string
|
||||
"Infinity|" + // "Infinity" string
|
||||
|
||||
// A decimal floating-point string representing a finite positive
|
||||
// number without a leading sign has at most five basic pieces:
|
||||
// Digits . Digits ExponentPart FloatTypeSuffix
|
||||
//
|
||||
// Since this method allows integer-only strings as input
|
||||
// in addition to strings of floating-point literals, the
|
||||
// two sub-patterns below are simplifications of the grammar
|
||||
// productions from the Java Language Specification, 2nd
|
||||
// edition, section 3.10.2.
|
||||
|
||||
// Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
|
||||
"((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
|
||||
|
||||
// . Digits ExponentPart_opt FloatTypeSuffix_opt
|
||||
"(\\.("+Digits+")("+Exp+")?)|"+
|
||||
|
||||
// Hexadecimal strings
|
||||
"((" +
|
||||
// 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "(\\.)?)|" +
|
||||
|
||||
// 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
|
||||
"(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
|
||||
|
||||
")[pP][+-]?" + Digits + "))" +
|
||||
"[fFdD]?))" +
|
||||
"[\\x00-\\x20]*");// Optional trailing "whitespace"
|
||||
|
||||
return java.util.regex.Pattern.matches(fpRegex, getText());
|
||||
}
|
||||
|
||||
/** Sets a double-value into the JNumberField. */
|
||||
public void setDouble(double d) {
|
||||
setText(String.valueOf(d));
|
||||
}
|
||||
|
||||
/** Sets a double-value with N digits into the JNumberField. */
|
||||
public void setDouble(double d, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", d));
|
||||
}
|
||||
|
||||
/** Sets a float-value into the JNumberField. */
|
||||
public void setFloat(float f) {
|
||||
setText(String.valueOf(f));
|
||||
}
|
||||
|
||||
/** Sets a float-value with N digits into the JNumberField. */
|
||||
public void setFloat(float f, int N) {
|
||||
setText(String.format(Locale.ENGLISH, "%." + N + "f", f));
|
||||
}
|
||||
|
||||
/** Sets an int-value into the JNumberField. */
|
||||
public void setInt(int i) {
|
||||
setText(String.valueOf(i));
|
||||
}
|
||||
|
||||
/** Sets a long-value into the JNumberField. */
|
||||
public void setLong(long l) {
|
||||
setText(String.valueOf(l));
|
||||
}
|
||||
|
||||
/** Clears the JNumberField */
|
||||
public void clear() {
|
||||
setText("");
|
||||
}
|
||||
|
||||
protected void processKeyEvent(KeyEvent e) {
|
||||
super.processKeyEvent(e);
|
||||
if (isNumeric() || getText().equals("-") ||
|
||||
getText().equals("") || getText().equals("."))
|
||||
setBackground(Color.white);
|
||||
else
|
||||
setBackground(Color.red);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Die Klasse Spieler speichert die Daten eines Spielers für das Spiel Spielleitung.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spieler {
|
||||
// Anfang Attribute
|
||||
private int guthaben; // Guthaben des Spielers
|
||||
private int einsatz = 0; // Betrag den der Spieler gesetzt hat
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Spieler mit einem bestimmten Startguthaben.
|
||||
* @param guthaben Startguthaben des Spielers
|
||||
*/
|
||||
public Spieler(int guthaben) {
|
||||
this.guthaben = guthaben;
|
||||
this.einsatz = 0;
|
||||
}
|
||||
|
||||
/** Liefert das aktuelle Guthaben des Spielers.
|
||||
* @return Guthaben des Spielers
|
||||
*/
|
||||
public int getGuthaben() {
|
||||
return guthaben;
|
||||
}
|
||||
|
||||
/** Setzt den Einsatz für das nächste Spiel.
|
||||
* @param betrag eingesetzter Betrag
|
||||
*/
|
||||
public void setze(int betrag) {
|
||||
einsatz += betrag;
|
||||
guthaben -= betrag;
|
||||
}
|
||||
|
||||
/** Rechnet den Gewinn des Spielers ab, da er gewonnen hat.
|
||||
*/
|
||||
public void gewonnen() {
|
||||
guthaben += (2 * einsatz);
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
/** Da der Spieler verloren hat, ist der Einsatz verloren.
|
||||
*/
|
||||
public void verloren() {
|
||||
einsatz = 0;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spieler
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Spielleiter für das Würfelspiel Spielleitung .
|
||||
* Es werden die Mitspieler verwaltet, der aktuelle Spieler gespeichert, die Würfel erzeugt.
|
||||
*
|
||||
* @version 1.0 vom 20.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Spielleitung {
|
||||
|
||||
// Anfang Attribute
|
||||
private ArrayList<Spieler> spieler; // Referenz auf die Spieler
|
||||
private Wuerfel[] wuerfel = new Wuerfel[2]; // Referenz auf die Würfel
|
||||
private int amZug=0; // Nummer des Spielers der am Zug ist
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt den Spielleiter für Spielleitung. Es werden auch die notwendigen zwei Würfel erzeugt.
|
||||
*/
|
||||
public Spielleitung() {
|
||||
this.wuerfel[0] = new Wuerfel(); // Würfel erzeugen
|
||||
this.wuerfel[1] = new Wuerfel();
|
||||
this.spieler = new ArrayList<Spieler>();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Meldet einen Spieler beim Spielleiter an. Der Spieler wird darüber informiert, wer der Spielleiter ist.
|
||||
* @param s Spieler, der angemeldet werden soll.
|
||||
*/
|
||||
public void addSpieler(Spieler s) {
|
||||
spieler.add(s);
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Gewinnwurf ist.
|
||||
* @return true, wenn es sich um einen Gewinnwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean gewinnwurf () {
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==6) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==3 && wuerfel[1].getWurf()==3) return true;
|
||||
if (wuerfel[0].getWurf()==6 && wuerfel[1].getWurf()==5) return true;
|
||||
if (wuerfel[0].getWurf()==5 && wuerfel[1].getWurf()==6) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Testet, ob die aktuelle Würfelkombination ein Verlustwurf ist.
|
||||
* @return true, wenn es sich um einen Verlustwurf handelt, sonst false.
|
||||
*/
|
||||
public boolean verlustwurf () {
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==1) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==4 && wuerfel[1].getWurf()==4) return true;
|
||||
if (wuerfel[0].getWurf()==1 && wuerfel[1].getWurf()==2) return true;
|
||||
if (wuerfel[0].getWurf()==2 && wuerfel[1].getWurf()==1) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Wertet den letzten Würfelwurf aus. Falls es ein Gewinn- oder Verlustwurf ist,
|
||||
* werden die Spieler über ihren Sieg / Verlust informiert.
|
||||
* @return true, wenn es sich um einen Gewinn- oder Verlustwurf handelt und ein neuer Durchgang beginnen muss, sonst false.
|
||||
*/
|
||||
public boolean auswerten() {
|
||||
if (gewinnwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler gewinnt
|
||||
s.gewonnen();
|
||||
} else {
|
||||
s.verloren();
|
||||
}// end of if
|
||||
} // end of for
|
||||
return true;
|
||||
} // end of if
|
||||
if (verlustwurf()) {
|
||||
for (int i = 0; i< spieler.size(); i++) {
|
||||
Spieler s = spieler.get(i);
|
||||
if (i == amZug) { // Würfelnder Spieler verliert
|
||||
s.verloren();
|
||||
} else {
|
||||
s.gewonnen();
|
||||
}// end of if
|
||||
} // end of for
|
||||
} // end of if
|
||||
amZug = (amZug+1)% spieler.size(); // der nächste Spieler wird aktueller Spieler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Würfel
|
||||
* @param nr Nummer des gewünschten Würfels
|
||||
* @return Referenz auf den Würfel
|
||||
*/
|
||||
public Wuerfel getWuerfel(int nr) {
|
||||
return wuerfel[nr];
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf einen Spieler
|
||||
* @param nr Nummer des gewünschten Spielers
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpieler(int nr) {
|
||||
return spieler.get(nr);
|
||||
}
|
||||
|
||||
/** liefert eine Referenz auf den Spieler der am Zug ist
|
||||
* @return Referenz auf den Spieler
|
||||
*/
|
||||
public Spieler getSpielerAmZug() {
|
||||
return spieler.get(amZug);
|
||||
}
|
||||
public void wuerfeln() {
|
||||
|
||||
wuerfel[0].wuerfeln();
|
||||
wuerfel[1].wuerfeln();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Spielleitung
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Stellt einen Würfel für Würfelspiele bereit. Per Zufall wird jeweils der nächste
|
||||
* Wurf ermittelt.
|
||||
*
|
||||
* @version 1.0 vom 19.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
public class Wuerfel {
|
||||
|
||||
// Anfang Attribute
|
||||
private int wurf; // letzter Wurf
|
||||
private Random zufallszahlen = new Random(); // Hilfsklasse für Zufallszahlen
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt einen Würfel und würfelt ein erstes Mal, um eine zufällige Seite oben
|
||||
* liegen zu lassen.
|
||||
*/
|
||||
public Wuerfel() {
|
||||
wuerfeln();
|
||||
}
|
||||
|
||||
// Anfang Methoden
|
||||
/** Liefert das Ergebnis des letzten Würfelns.
|
||||
* @return wurf Augenzahl des letzten Wurfs.
|
||||
*/
|
||||
public int getWurf() {
|
||||
return wurf;
|
||||
}
|
||||
|
||||
/** Würfelt den Würfel. Eine neue Zufallszahl wird bestimmt.
|
||||
*/
|
||||
public void wuerfeln() {
|
||||
wurf = zufallszahlen.nextInt(6)+1;
|
||||
}
|
||||
|
||||
// Ende Methoden
|
||||
} // end of Wuerfel
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
import javax.swing.JPanel;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Hilfsklasse zum Anzeigen zweier Würfel für Würfelspiele.
|
||||
* Je nach Augenzahl der letzten Würfelergebnisse werden die Bilder wuerfel_1.gif - wuerfel_6.gif angezeigt.
|
||||
*
|
||||
* @version 1.0 vom 16.06.2012
|
||||
* @author Thomas Schaller
|
||||
*/
|
||||
|
||||
|
||||
public class WuerfelPanel extends JPanel {
|
||||
|
||||
// Anfang Attribute
|
||||
private Image[] bilder = new Image[6]; // Referenz auf die Würfelbilder wuerfel_x.gif
|
||||
private Wuerfel wuerfel1, wuerfel2; // Referenz auf die anzuzeigenden Würfel
|
||||
// Ende Attribute
|
||||
|
||||
/** Erzeugt ein Anzeigepanel für zwei Würfel.
|
||||
* @param w1 1. Würfel
|
||||
* @param w2 2. Würfel
|
||||
*/
|
||||
public WuerfelPanel(Wuerfel w1, Wuerfel w2) {;
|
||||
this.wuerfel1 = w1;
|
||||
this.wuerfel2 = w2;
|
||||
// Bilder laden
|
||||
for (int i = 0; i <6 ; i++ ) {
|
||||
bilder[i] = Toolkit.getDefaultToolkit().getImage("wuerfel_"+(i+1)+".gif");
|
||||
} // end of for
|
||||
this.setBackground(Color.white);
|
||||
}
|
||||
|
||||
/** Zeichnet das Panel. Angezeigt werden die Bilder für die zwei Augenzahlen der beiden Würfel.
|
||||
* Diese Methode wird automatisch von Java aufgerufen.
|
||||
* @param g Grafikkontext auf dem gezeichnet werden soll.
|
||||
*/
|
||||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
g.drawImage(bilder[wuerfel1.getWurf()-1],45,40,Color.white,this);
|
||||
g.drawImage(bilder[wuerfel2.getWurf()-1],105,40,Color.white,this);
|
||||
}
|
||||
|
||||
} // end of Board
|
||||