From: Astrid S. <ast...@us...> - 2008-03-23 20:43:38
|
Update of /cvsroot/arianne/stendhal/tests/games/stendhal/server/entity In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv2819/tests/games/stendhal/server/entity Modified Files: RPEntityTest.java Log Message: code format Index: RPEntityTest.java =================================================================== RCS file: /cvsroot/arianne/stendhal/tests/games/stendhal/server/entity/RPEntityTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RPEntityTest.java 23 Mar 2008 16:28:01 -0000 1.1 --- RPEntityTest.java 23 Mar 2008 20:43:40 -0000 1.2 *************** *** 31,40 **** @Test public void testCalculateRiskForCanHit() { ! RPEntity entity= new RPEntity(){ @Override protected void dropItemsOn(Corpse corpse) { // TODO Auto-generated method stub - } --- 31,39 ---- @Test public void testCalculateRiskForCanHit() { ! RPEntity entity = new RPEntity() { @Override protected void dropItemsOn(Corpse corpse) { // TODO Auto-generated method stub } *************** *** 43,93 **** // TODO Auto-generated method stub ! }}; ! int defenderDEF=0; ! int attackerATK=0; ! assertThat(entity.calculateRiskForCanHit(1, defenderDEF, attackerATK),is(-9)); ! assertThat(entity.calculateRiskForCanHit(2, defenderDEF, attackerATK),is(-8)); ! assertThat(entity.calculateRiskForCanHit(3, defenderDEF, attackerATK),is(-7)); ! assertThat(entity.calculateRiskForCanHit(4, defenderDEF, attackerATK),is(-6)); ! assertThat(entity.calculateRiskForCanHit(5, defenderDEF, attackerATK),is(-5)); ! assertThat(entity.calculateRiskForCanHit(6, defenderDEF, attackerATK),is(-4)); ! assertThat(entity.calculateRiskForCanHit(7, defenderDEF, attackerATK),is(-3)); ! assertThat(entity.calculateRiskForCanHit(8, defenderDEF, attackerATK),is(-2)); ! assertThat(entity.calculateRiskForCanHit(9, defenderDEF, attackerATK),is(-1)); ! assertThat(entity.calculateRiskForCanHit(10, defenderDEF, attackerATK),is(0)); ! assertThat(entity.calculateRiskForCanHit(11, defenderDEF, attackerATK),is(1)); ! assertThat(entity.calculateRiskForCanHit(12, defenderDEF, attackerATK),is(2)); ! assertThat(entity.calculateRiskForCanHit(13, defenderDEF, attackerATK),is(3)); ! assertThat(entity.calculateRiskForCanHit(14, defenderDEF, attackerATK),is(4)); ! assertThat(entity.calculateRiskForCanHit(15, defenderDEF, attackerATK),is(5)); ! assertThat(entity.calculateRiskForCanHit(16, defenderDEF, attackerATK),is(6)); ! assertThat(entity.calculateRiskForCanHit(17, defenderDEF, attackerATK),is(7)); ! assertThat(entity.calculateRiskForCanHit(18, defenderDEF, attackerATK),is(8)); ! assertThat(entity.calculateRiskForCanHit(19, defenderDEF, attackerATK),is(9)); ! assertThat(entity.calculateRiskForCanHit(20, defenderDEF, attackerATK),is(10)); ! defenderDEF=10; ! attackerATK=5; ! assertThat(entity.calculateRiskForCanHit(1, defenderDEF, attackerATK),is(-9)); ! assertThat(entity.calculateRiskForCanHit(2, defenderDEF, attackerATK),is(-8)); ! assertThat(entity.calculateRiskForCanHit(3, defenderDEF, attackerATK),is(-7)); ! assertThat(entity.calculateRiskForCanHit(4, defenderDEF, attackerATK),is(-6)); ! assertThat(entity.calculateRiskForCanHit(5, defenderDEF, attackerATK),is(-5)); ! assertThat(entity.calculateRiskForCanHit(6, defenderDEF, attackerATK),is(-4)); ! assertThat(entity.calculateRiskForCanHit(7, defenderDEF, attackerATK),is(-3)); ! assertThat(entity.calculateRiskForCanHit(8, defenderDEF, attackerATK),is(-2)); ! assertThat(entity.calculateRiskForCanHit(9, defenderDEF, attackerATK),is(-1)); ! assertThat(entity.calculateRiskForCanHit(10, defenderDEF, attackerATK),is(0)); ! assertThat(entity.calculateRiskForCanHit(11, defenderDEF, attackerATK),is(1)); ! assertThat(entity.calculateRiskForCanHit(12, defenderDEF, attackerATK),is(2)); ! assertThat(entity.calculateRiskForCanHit(13, defenderDEF, attackerATK),is(3)); ! assertThat(entity.calculateRiskForCanHit(14, defenderDEF, attackerATK),is(4)); ! assertThat(entity.calculateRiskForCanHit(15, defenderDEF, attackerATK),is(5)); ! assertThat(entity.calculateRiskForCanHit(16, defenderDEF, attackerATK),is(6)); ! assertThat(entity.calculateRiskForCanHit(17, defenderDEF, attackerATK),is(7)); ! assertThat(entity.calculateRiskForCanHit(18, defenderDEF, attackerATK),is(8)); ! assertThat(entity.calculateRiskForCanHit(19, defenderDEF, attackerATK),is(9)); ! assertThat(entity.calculateRiskForCanHit(20, defenderDEF, attackerATK),is(10)); } --- 42,93 ---- // TODO Auto-generated method stub ! } ! }; ! int defenderDEF = 0; ! int attackerATK = 0; ! assertThat(entity.calculateRiskForCanHit(1, defenderDEF, attackerATK), is(-9)); ! assertThat(entity.calculateRiskForCanHit(2, defenderDEF, attackerATK), is(-8)); ! assertThat(entity.calculateRiskForCanHit(3, defenderDEF, attackerATK), is(-7)); ! assertThat(entity.calculateRiskForCanHit(4, defenderDEF, attackerATK), is(-6)); ! assertThat(entity.calculateRiskForCanHit(5, defenderDEF, attackerATK), is(-5)); ! assertThat(entity.calculateRiskForCanHit(6, defenderDEF, attackerATK), is(-4)); ! assertThat(entity.calculateRiskForCanHit(7, defenderDEF, attackerATK), is(-3)); ! assertThat(entity.calculateRiskForCanHit(8, defenderDEF, attackerATK), is(-2)); ! assertThat(entity.calculateRiskForCanHit(9, defenderDEF, attackerATK), is(-1)); ! assertThat(entity.calculateRiskForCanHit(10, defenderDEF, attackerATK), is(0)); ! assertThat(entity.calculateRiskForCanHit(11, defenderDEF, attackerATK), is(1)); ! assertThat(entity.calculateRiskForCanHit(12, defenderDEF, attackerATK), is(2)); ! assertThat(entity.calculateRiskForCanHit(13, defenderDEF, attackerATK), is(3)); ! assertThat(entity.calculateRiskForCanHit(14, defenderDEF, attackerATK), is(4)); ! assertThat(entity.calculateRiskForCanHit(15, defenderDEF, attackerATK), is(5)); ! assertThat(entity.calculateRiskForCanHit(16, defenderDEF, attackerATK), is(6)); ! assertThat(entity.calculateRiskForCanHit(17, defenderDEF, attackerATK), is(7)); ! assertThat(entity.calculateRiskForCanHit(18, defenderDEF, attackerATK), is(8)); ! assertThat(entity.calculateRiskForCanHit(19, defenderDEF, attackerATK), is(9)); ! assertThat(entity.calculateRiskForCanHit(20, defenderDEF, attackerATK), is(10)); ! defenderDEF = 10; ! attackerATK = 5; ! assertThat(entity.calculateRiskForCanHit(1, defenderDEF, attackerATK), is(-9)); ! assertThat(entity.calculateRiskForCanHit(2, defenderDEF, attackerATK), is(-8)); ! assertThat(entity.calculateRiskForCanHit(3, defenderDEF, attackerATK), is(-7)); ! assertThat(entity.calculateRiskForCanHit(4, defenderDEF, attackerATK), is(-6)); ! assertThat(entity.calculateRiskForCanHit(5, defenderDEF, attackerATK), is(-5)); ! assertThat(entity.calculateRiskForCanHit(6, defenderDEF, attackerATK), is(-4)); ! assertThat(entity.calculateRiskForCanHit(7, defenderDEF, attackerATK), is(-3)); ! assertThat(entity.calculateRiskForCanHit(8, defenderDEF, attackerATK), is(-2)); ! assertThat(entity.calculateRiskForCanHit(9, defenderDEF, attackerATK), is(-1)); ! assertThat(entity.calculateRiskForCanHit(10, defenderDEF, attackerATK), is(0)); ! assertThat(entity.calculateRiskForCanHit(11, defenderDEF, attackerATK), is(1)); ! assertThat(entity.calculateRiskForCanHit(12, defenderDEF, attackerATK), is(2)); ! assertThat(entity.calculateRiskForCanHit(13, defenderDEF, attackerATK), is(3)); ! assertThat(entity.calculateRiskForCanHit(14, defenderDEF, attackerATK), is(4)); ! assertThat(entity.calculateRiskForCanHit(15, defenderDEF, attackerATK), is(5)); ! assertThat(entity.calculateRiskForCanHit(16, defenderDEF, attackerATK), is(6)); ! assertThat(entity.calculateRiskForCanHit(17, defenderDEF, attackerATK), is(7)); ! assertThat(entity.calculateRiskForCanHit(18, defenderDEF, attackerATK), is(8)); ! assertThat(entity.calculateRiskForCanHit(19, defenderDEF, attackerATK), is(9)); ! assertThat(entity.calculateRiskForCanHit(20, defenderDEF, attackerATK), is(10)); } |