Archived

This topic is now archived and is closed to further replies.

Stats

This topic is 5093 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to develop a simple hex game like ogre. How would you all suggest I store the stats for each piece ie...Attack, defense, movement points, ect... in C# Enums, Index Arrays, ArrayList ? Thanks for any advice RSteel

Share this post


Link to post
Share on other sites
I've never played orge myself, but from a personal opinion I would either create a struct or class to store them in. I would recommend a struct more than a class as it is used for less complex problems.


public struct Stats
{
public int attack;
public int defense;
public int movement;

// Constructor:
public Stats()
{
this.attack = 0;
this.defense = 0;
this.movement = 0;
}

etc.....
}




----
Mike
Portfolio: Http://members.iinet.net.au/~slyons
Team AI: Http://members.iinet.net.au/~slyons/teamai



[edited by - Mike737 on January 6, 2004 2:47:23 AM]

Share this post


Link to post
Share on other sites
Thanks,

Ogre is like a hex style tile game. Each individual piece ie...tank...infantry...ect..has movement points, attack pts..def...ect..

How would you go about storing each piece with its information, to be called upon? I was thinking about instantiating an object, filling the object with the information and storing it in an array. Is there an easier way?



Thanks for any help
RSteel

Share this post


Link to post
Share on other sites