A turn-based virtual world simulator implementing object-oriented programming principles in C++. The project features a 2D grid world populated by various animals and plants with unique behaviors.
- Windows operating system
- Visual Studio (with C++ support)
- Open the
.slnsolution file in Visual Studio - Build the solution (F7 or Build → Build Solution)
- Run the executable from the output directory
Enter - Next turn / Confirm player's move
Arrows - Move cursor (when player's turn)
E - Special ability (when player's turn)
L - Save Game
M - Main Menu
Q - Quit
- Press Enter to start the turn
- Use Arrow keys to select the destination field
- Press Enter again to confirm the move
The world contains two types of organisms:
-
Human (H) - Player-controlled character
- Strength: 5, Initiative: 4
- Special ability available every 10 turns (active for 5 turns)
- Color: Light Magenta
-
Wolf (W) - Aggressive predator
- Strength: 9, Initiative: 5
- Color: Gray
-
Sheep (S) - Peaceful herbivore
- Strength: 4, Initiative: 4
- Color: White
-
Fox (F) - Cunning animal with keen sense of smell
- Strength: 3, Initiative: 7
- Never moves to a field with a stronger organism
- Color: Dark Yellow
-
Turtle (T) - Slow but defensive
- Strength: 2, Initiative: 1
- 75% chance to stay in place
- Deflects attacks from organisms with strength < 5
- Color: Dark Green
-
Antelope (A) - Fast runner
- Strength: 4, Initiative: 4
- Movement range: 2 fields
- 50% chance to escape before combat
- Color: Yellow
-
Grass (0) - Basic plant
- Strength: 0
- Color: Green
-
Milkweed (M) - Aggressive spreader
- Strength: 0
- Makes 3 spreading attempts per turn
- Color: Dark Magenta
-
Guarana (+) - Strength booster
- Strength: 0
- Increases the strength of the animal that eats it by 3
- Color: Light Red
-
Wolfberry (!) - Deadly poison
- Strength: 99
- Animal that eats it dies
- Color: Red
-
Sosnowsky Hogweed (*) - Dangerous plant
- Strength: 10
- Kills all adjacent animals each turn
- Animal that eats it dies
- Color: Dark Red
-
Turn Order: Organisms move based on initiative (higher initiative moves first). In case of equal initiative, older organisms move first.
-
Combat: When two organisms occupy the same field:
- The organism with higher strength wins
- In case of equal strength, the attacker wins
- Defeated organism is removed from the world
-
Reproduction: When two animals of the same species collide, they don't fight. Instead, a new organism of that species appears in an adjacent empty field.
-
Plant Spreading: Each turn, plants have a chance to spread to adjacent empty fields.
| Symbol | Organism | Type |
|---|---|---|
| H | Human | Animal |
| W | Wolf | Animal |
| S | Sheep | Animal |
| F | Fox | Animal |
| T | Turtle | Animal |
| A | Antelope | Animal |
| 0 | Grass | Plant |
| M | Milkweed | Plant |
| + | Guarana | Plant |
| ! | Wolfberry | Plant |
| * | Sosnowsky Hogweed | Plant |
The Human character has a special ability:
-
Can be activated by pressing E
-
Remains active for 5 consecutive turns
-
Cannot be reactivated for 5 turns after deactivation
-
Burns all organisms around the Human