.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How to think?

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application


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

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend