T
tomtiv
Hi All,
I am starting to build a hockey game simulator. I am looking for any
resources you know of to help me build this application, Specifically
these topics.
- AI for game play (Text Based)
- Game schedule generation.
- Statistic management.
Also I am having a little trouble with the logic to generate all the
players attributes. I am using the code below.
Random random = new Random(System.Environment.TickCount);
//System.TimeSpan.FromTicks( );
for (Int32 i = 0; i < arr.Length; i++)
{
Int32 iOverall = 0;
Int32[] arrAttributeString = new Int32[Counter];
for (Int32 x = 0; x < arrAttributeString.Length - 1;
x++)
{
arrAttributeString[x] =
random.Next(_iMinAttributeValue, _iMaxAttributeValue);
iOverall += arrAttributeString[x];
}
arrAttributeString[arrAttributeString.GetUpperBound(0)]
= iOverall / Counter - 1;
arr.SetValue(arrAttributeString, i);
}
return arr;
This code works but the attributes don't compare to some other
simulatore i have looked at.
An example is if a player has 4 attributes (50, 50 75, 65) his overall
value would be 60.
I was hoping to see how other developers create this functioanlity.
Thanks
Thomas
I am starting to build a hockey game simulator. I am looking for any
resources you know of to help me build this application, Specifically
these topics.
- AI for game play (Text Based)
- Game schedule generation.
- Statistic management.
Also I am having a little trouble with the logic to generate all the
players attributes. I am using the code below.
Random random = new Random(System.Environment.TickCount);
//System.TimeSpan.FromTicks( );
for (Int32 i = 0; i < arr.Length; i++)
{
Int32 iOverall = 0;
Int32[] arrAttributeString = new Int32[Counter];
for (Int32 x = 0; x < arrAttributeString.Length - 1;
x++)
{
arrAttributeString[x] =
random.Next(_iMinAttributeValue, _iMaxAttributeValue);
iOverall += arrAttributeString[x];
}
arrAttributeString[arrAttributeString.GetUpperBound(0)]
= iOverall / Counter - 1;
arr.SetValue(arrAttributeString, i);
}
return arr;
This code works but the attributes don't compare to some other
simulatore i have looked at.
An example is if a player has 4 attributes (50, 50 75, 65) his overall
value would be 60.
I was hoping to see how other developers create this functioanlity.
Thanks
Thomas