mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 16:49:12 +00:00
Removed inline comments
This commit is contained in:
@@ -52,7 +52,6 @@ public final class MobRepository<T extends Mob> implements Iterable<T> {
|
|||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
int index = current;
|
int index = current;
|
||||||
|
|
||||||
// return true iff there is a non-null element within the repository
|
|
||||||
while (index <= repository.size()) {
|
while (index <= repository.size()) {
|
||||||
Mob mob = repository.mobs[index++];
|
Mob mob = repository.mobs[index++];
|
||||||
if (mob != null) {
|
if (mob != null) {
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ public final class MobRepositoryTest {
|
|||||||
|
|
||||||
players.add(player);
|
players.add(player);
|
||||||
|
|
||||||
// Ensure validity of added Player otherwise this test cannot continue
|
|
||||||
assertEquals(1, players.size());
|
assertEquals(1, players.size());
|
||||||
assertEquals(player, players.get(player.getIndex()));
|
assertEquals(player, players.get(player.getIndex()));
|
||||||
|
|
||||||
@@ -81,7 +80,6 @@ public final class MobRepositoryTest {
|
|||||||
public void testCapacityExceeded() {
|
public void testCapacityExceeded() {
|
||||||
MobRepository<Player> players = new MobRepository<>(CAPACITY);
|
MobRepository<Player> players = new MobRepository<>(CAPACITY);
|
||||||
|
|
||||||
// Fill up the repository
|
|
||||||
for (int index = 0; index < CAPACITY; index++) {
|
for (int index = 0; index < CAPACITY; index++) {
|
||||||
Player player = mock(Player.class);
|
Player player = mock(Player.class);
|
||||||
when(player.getIndex()).thenReturn(index + 1);
|
when(player.getIndex()).thenReturn(index + 1);
|
||||||
@@ -89,7 +87,6 @@ public final class MobRepositoryTest {
|
|||||||
assertTrue(players.add(player));
|
assertTrue(players.add(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to add one more Player.
|
|
||||||
Player player = mock(Player.class);
|
Player player = mock(Player.class);
|
||||||
when(player.getIndex()).thenReturn(CAPACITY);
|
when(player.getIndex()).thenReturn(CAPACITY);
|
||||||
|
|
||||||
@@ -186,7 +183,6 @@ public final class MobRepositoryTest {
|
|||||||
iterator.next();
|
iterator.next();
|
||||||
iterator.next();
|
iterator.next();
|
||||||
|
|
||||||
// There should only be two elements in the iterator, this is invalid.
|
|
||||||
iterator.next();
|
iterator.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,8 +202,6 @@ public final class MobRepositoryTest {
|
|||||||
|
|
||||||
Iterator<Player> iterator = players.iterator();
|
Iterator<Player> iterator = players.iterator();
|
||||||
|
|
||||||
// remove() may only be called once per call to next(), we have not
|
|
||||||
// called next()
|
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user