I've recently started my own project. It's a program for a silly browser game, but I thought I'd put together study with fun, but I'm having some problems.
Currently I've made the program, and it works. I've got a few radio buttons where you can pick from different armours, that give you different percentage increases on Gold and Exp when fighting. I've got a combobox with the creatures you can fight. But here
is the main issue;
There are over 40 creatures, and each creature has it's minimum, average and maximum gold and exp value, so there's 6 values per creature. Currently I've done this by having 6 double variables, and 40 if statements, one for each creature. So if creature
X is checked, I get a min, max, average value on both gold and exp stored in the double variables. However, this does not seem like the best method; 40 if statements... So I figured it might be better to store them in a database. But the problem there is that
I want my program to consist of only 1 file, namely the .exe itself. So how do I do? How do I think? I definitely feel like I need to sort my thinking and optimize the code, for myself and for the program, but I don't know where to start.
Also, there are a few races, with different attributes on a few pieces of weapons, but the general outline is the same, namely the creatures, the armour et.c. But how
View Complete Post