クラス Player

java.lang.Object
  上位を拡張 Player

public class Player
extends Object

ジャンケンのプレイヤーを表すクラス。


コンストラクタの概要
Player(String name)
          プレイヤークラスのコンストラクタ。
 
メソッドの概要
 String getName()
          自分の名前を答える。
 int getWinCount()
          自分の勝った回数を答える。
 void notifyResult(boolean result)
          審判から勝敗を聞く。
 Hand showHand()
          ジャンケンの手を出す。
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Player

public Player(String name)
プレイヤークラスのコンストラクタ。

パラメータ:
name - 名前
メソッドの詳細

showHand

public Hand showHand()
ジャンケンの手を出す。

戻り値:
ジャンケンの手

notifyResult

public void notifyResult(boolean result)
審判から勝敗を聞く。

パラメータ:
result - true:勝ち,false:負け

getWinCount

public int getWinCount()
自分の勝った回数を答える。

戻り値:
勝った回数

getName

public String getName()
自分の名前を答える。

戻り値:
名前