File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 22
33# Ecosystem simulation project info
441 . [ Project info] ( #project-info )
5- * [ Technology] ( #technology )
6- * [ Aim] ( #aim )
5+ * [ Technology] ( #technology )
6+ * [ Aim] ( #aim )
772 . [ Board] ( #meadow-board )
8+ 3 . [ Animals] ( #animals )
9+ * [ General concept] ( #general-concept )
810
911# Project info
1012
@@ -24,3 +26,22 @@ Board is 2 dimension matrix in Meadow class.
2426
2527Info:
2628* emoji: 🟩
29+
30+
31+ # Animals
32+
33+ ## General concept
34+
35+ Animal - asbtract class for animals.
36+
37+ Properties:
38+ * timesAteToReproduce - how many times need to eat in order to reproduce
39+ * ate - how many times it ate without reproducing
40+ * endurance - how many rounds can go without eating before dying
41+ * health - currenct health level, if 0 - it dies
42+
43+ Methods:
44+ * reproduce - abstract reproduction which result is new Animal of the same type
45+ * eat - abstract eating method of some MeadowBoard object that should
46+ affect some other properties and may result in reproducing
47+
Original file line number Diff line number Diff line change 1+ public abstract class Animal {
2+
3+ int timesAteToReproduce ;
4+ int ate ;
5+ int endurance ;
6+ int health ;
7+
8+ public abstract Animal reproduce ();
9+ public abstract boolean Eat (BoardMovement sth );
10+ }
You can’t perform that action at this time.
0 commit comments