44 lines
645 B
Java
44 lines
645 B
Java
public class Spieler1 {
|
|
int kd ;
|
|
int siege;
|
|
int niederlagen;
|
|
String name;
|
|
public Spieler1(String pName)
|
|
{
|
|
kd = 0;
|
|
siege = 0;
|
|
niederlagen = 0;
|
|
name = pName;
|
|
}
|
|
|
|
public String getName()
|
|
{
|
|
return name;
|
|
}
|
|
|
|
public int siege()
|
|
{
|
|
return siege;
|
|
}
|
|
|
|
public int niederlagen()
|
|
{
|
|
return niederlagen;
|
|
}
|
|
|
|
public void sieg()
|
|
{
|
|
siege += 1;
|
|
}
|
|
|
|
public void niederlage()
|
|
{
|
|
niederlagen += 1;
|
|
}
|
|
|
|
public double kd()
|
|
{
|
|
kd = siege/niederlagen;
|
|
return kd;
|
|
}
|
|
} |