atisharma / Space-mining-poker

GNU General Public License v3.0
1 stars 1 forks source link

Main program should read rc file for players, constants etc #7

Closed atisharma closed 6 years ago

atisharma commented 6 years ago

Main program should read rc or ini file for players, rather than have them hard-coded.

Pretty easy to implement with ConfigObj / ConfigParser. Possible format could be something like:

[constants]
initial_bankroll = 1000
initial_tech = 0
base_price = 5
base_tech = 11
bid_tech = 11
failure = 0.1
failure_attenuation = 0.98

[players]

[[player1]]
name = Ati
type = Terminal

[[player2]]
type = Network
name = Alex
location = location:49000

[[player3]]
type = SpongeBob
name = SpongeBob

Alternative formats could be json or a simple import of a python file.

atisharma commented 6 years ago

done via simple import.