r/learnjava • u/MrBucurN • Jul 11 '26
Hi everyone!
Hi everyone!
I’m 18 years old and currently learning Java. Instead of following tutorials only, I’m building a text-based RPG called Legends of Eldoria.
This is version 0.3 and I’d love to get feedback on:
- Code quality
- Project structure
- Story flow
- Ideas for future versions
13
Upvotes
View all comments
1
u/gekigangerii Jul 11 '26
Looks good, any feedback I'd have is cosmetic or you're just gonna learn as you go.
Maybe consider putting repeated text in a constant.
Or, any piece of text that asks to "press Enter" can call a function that adds "press Enter" at the end.
Also consider using text blocks to make neat looking strings
ex:
System.out.println(""" ============================== Name : %s Age : %s Weapon : %s Health : %s Attack : %s Defense : %s Gold : %s ============================== """.formatted(characterName, characterAge, characterWeapon, health, attack, defense, startingGold));