package com.egloos.realmove.dp.strategy; import com.egloos.realmove.dp.strategy.framework.Hand; import com.egloos.realmove.dp.strategy.framework.HandGameStrategy; /** * ¿ÏÀüÈ÷ Random ÇÏ°Ô ¼ÕÀ» ³»¹Î´Ù. */ public class RandomStrategy implements HandGameStrategy { public Hand getRandom() { int i = (int) ( Math.random() * 3 ); if ( i == Hand.SCISSOR.getValue() ) { return Hand.SCISSOR; } else if ( i == Hand.ROCK.getValue() ) { return Hand.ROCK; } else { return Hand.PAPER; } } @Override public Hand next() { return this.getRandom(); } @Override public void study( int result ) { // do nothig } }