Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package ch.bbbaden.rio;
  7.  
  8. /**
  9.  *
  10.  * @author Manuel Saugy
  11.  */
  12. public class Spieler {
  13.  
  14.     private int anzahlStaebchen;
  15.     private String name;
  16.     private int alter;
  17.  
  18.     public Spieler(String name, int alter, int anzahlStaebchen) {
  19.         this.anzahlStaebchen = anzahlStaebchen;
  20.         this.name = name;
  21.         this.alter = alter;
  22.     }
  23.  
  24.     public void nimmStaebchen() {
  25.         anzahlStaebchen++;
  26.     }
  27.  
  28.     public void gibStaebchen() {
  29.         anzahlStaebchen--;
  30.     }
  31.  
  32.     public String getName() {
  33.         return name;
  34.     }
  35.  
  36.     public int getAlter() {
  37.         return alter;
  38.     }
  39.  
  40.     public int getAnzahlStaebchen() {
  41.         return anzahlStaebchen;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement