27 lines
483 B
Plaintext
27 lines
483 B
Plaintext
int coins = 100;
|
|
string playerName = "Alex";
|
|
|
|
// Коментприй
|
|
void showStats() {
|
|
print("--- Stats ---");
|
|
print("Player: " + playerName);
|
|
print("Coins: " + coins);
|
|
}
|
|
|
|
void mainLogic() {
|
|
print("Welcome to Fox Game!");
|
|
showStats();
|
|
|
|
print("You found a chest! Adding 50 coins.");
|
|
coins = coins + 50;
|
|
|
|
showStats();
|
|
|
|
print("Enter new name:");
|
|
playerName = input();
|
|
|
|
print("Updated profile:");
|
|
showStats();
|
|
}
|
|
|
|
mainLogic(); |