fix seeker/hider returning null
This commit is contained in:
parent
fcc3764a14
commit
3ec241766d
1 changed files with 3 additions and 3 deletions
|
@ -80,11 +80,11 @@ public class Board {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getHiders() {
|
public List<Player> getHiders() {
|
||||||
return Hider.stream().filter(Objects::nonNull).map(playerList::get).collect(Collectors.toList());
|
return Hider.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getSeekers() {
|
public List<Player> getSeekers() {
|
||||||
return Seeker.stream().filter(Objects::nonNull).map(playerList::get).collect(Collectors.toList());
|
return Seeker.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player getFirstSeeker() {
|
public Player getFirstSeeker() {
|
||||||
|
@ -92,7 +92,7 @@ public class Board {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getSpectators() {
|
public List<Player> getSpectators() {
|
||||||
return Spectator.stream().filter(Objects::nonNull).map(playerList::get).collect(Collectors.toList());
|
return Spectator.stream().filter(Objects::nonNull).map(playerList::get).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Player> getPlayers() {
|
public List<Player> getPlayers() {
|
||||||
|
|
Loading…
Reference in a new issue