I was wondering how one would go about reading certain things from a file, which will be conditions to how something must work.
First of I know how to read data from a file, but let me explain with an example.
I want to write a small program where the user would be able to "manipulate" the ethics of the program, to function differently as they want to, without actually touching the source code.
Create a back bone for a card game, which stores things such as how many decks to use, how many cards in each deck, and what rules to use.
Now I myself don't want to hardcode all of that, and have been able to get as far as having multiple decks, and any amount of cards in a deck, each deck consisting of sets.
What my idea is, is to let the user create files, like mygardgame.cfg (which holds the basic info of the card game) and mycardgame.rls (which holds the rules of the card game).
Now each card game will be played through the program, so I am in need of a way on how to interpret rules created by the user, without any actual coding by the user.
What is the posibility of actually creating something like this ?
P.S The whole idea isn't to make a game, but allow user manipulation to software by creating rules, and having the software interpret the rules.