Skip to content

move#1

Open
omel33 wants to merge 14 commits into
mainfrom
create
Open

move#1
omel33 wants to merge 14 commits into
mainfrom
create

Conversation

@omel33

@omel33 omel33 commented Jan 9, 2025

Copy link
Copy Markdown
Owner

No description provided.

omel33 added 14 commits January 9, 2025 20:35
# Conflicts:
#	src/main/java/org/example/carnivore/Bear.java
#	src/main/java/org/example/carnivore/Boa.java
#	src/main/java/org/example/carnivore/Wolf.java
#	src/main/java/org/example/herbivore/Boar.java
#	src/main/java/org/example/herbivore/Buffalo.java
#	src/main/java/org/example/herbivore/Caterpillar.java
#	src/main/java/org/example/herbivore/Deer.java
#	src/main/java/org/example/herbivore/Duck.java
#	src/main/java/org/example/herbivore/Goat.java
#	src/main/java/org/example/herbivore/Horse.java
#	src/main/java/org/example/herbivore/Rabbit.java
#	src/main/java/org/example/herbivore/Sheep.java

@Fabolo12 Fabolo12 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Загалом робота хороша, приділено багато зусиль

scheduler.scheduleAtFixedRate(this::runSimulation,0,1, TimeUnit.SECONDS);

private void initializeAnimals() {
addAnimals(config.getInitialWolfCount(), () -> new Wolf());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Цікаве рішення

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Папки таргет не повинно бути в гіті

Comment thread config1.yml
@@ -0,0 +1,23 @@
island:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

А чому ця конфігурація не в ресурсах?

Comment on lines +16 to +20
if (newLocation.getAnimals().size() < maxMoveCount) {
island.getLocation(currentX, currentY).removeAnimal(animal);
newLocation.addAnimal(animal);
Logger.getInstance().logMessage(animal.getClass().getSimpleName() + " moved from (" + currentX + ", " + currentY + ") to (" + newX + ", " + newY + ")");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

недостатньо поставити синхронізацію тільки на фінальну дію (додавання, видалення)

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