Skip to content

Comments

Proj lab1#11

Open
Bleidhu wants to merge 3 commits intomainfrom
proj-lab1
Open

Proj lab1#11
Bleidhu wants to merge 3 commits intomainfrom
proj-lab1

Conversation

@Bleidhu
Copy link
Owner

@Bleidhu Bleidhu commented Jan 6, 2025

No description provided.

Copy link
Collaborator

@Zbigniew-Kaleta Zbigniew-Kaleta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 pietruszki

Stream<String> optionsStream = Stream.of(options);

var result = optionsStream.map(option -> {
if (!(option.equals("f") || option.equals("b") || option.equals("l") || option.equals("r"))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ten if bardziej zaciemnia niż pomaga.


@Override
public List<Animal> getOrderedAnimals() {
return animals.values().stream().sorted(Comparator.comparing((Animal animal) -> animal.getPosition().getX()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zapis

return animalAt;
}
return grasses.get(position);
return Optional.ofNullable(grasses.get(position));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Czemu nie orElse?

writer.println(worldMap.toString());

writer.println("-----------------");
} catch (Exception e) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch co?

private static final Map<String, Image> images = new HashMap<>();

static {
String[] images = {"up.png", "right.png", "down.png", "left.png", "grass.png"};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nazwa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants