Text-RPG | Text RPG created as a fun project | Data Manipulation library
kandi X-RAY | Text-RPG Summary
kandi X-RAY | Text-RPG Summary
Text RPG created as a fun project to further learning of Python
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Analyze the player .
- Setup the game .
- Ask the player .
- print the map
- Prompts the user .
- Enter title screen selection
- Apply texte effect
- Main game loop .
- title screen
- Handles movement
Text-RPG Key Features
Text-RPG Examples and Code Snippets
Community Discussions
Trending Discussions on Text-RPG
QUESTION
I'm currently taking a programming 2 class (c++), we've been tasked to make a text based rpg. I'm using this post as a reference for my inventory system, as I think it's pretty effective. But I keep running into a E0349 "no operator "==" or "<<" matches these opperands" error.
If anyone could help me that would be great. Here is my full set of code:
...ANSWER
Answered 2019-Mar-22 at 08:42Equipment[i]
is an object of type Item
. If you don't provide a method to compare your object with "Empty"
the compiler can't know how to compare in line
QUESTION
I am a hobby coder who is learning by trying to make a text-RPG game on the console. I am just trying to think about how to design my code right now, and I'm getting stuck on how the items and inventory classes will work together. I have the inventory class defined like so:
...ANSWER
Answered 2017-Sep-01 at 23:08The correct method would be to use iterators. Don't pass pointer of 'Item' in
void AddItem(Item* item) method.
You should create an iterator of 'Item' class and pass this iterator to "AddItem" method. Similarly create another method "RemoveItem" that returns an iterator of 'Item' that can be sent to Player's "CollectMoney" method.
If you don't want to use iterators, you can use "Item * item" as well but you have to call a method "RemoveItem" to get the reference of the "Item" so you can pass it to Player. Since the Items are not created inside the class, they should not be deleted in the class so remove the destructor.
PS use this constructor -> Inventory() {items.resize(10,nullptr);}
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Text-RPG
You can use Text-RPG like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page