|
From: Ben K. <ben...@it...> - 2003-05-15 02:46:51
|
Thanks for the tech code Matthiew ,
I have integrated it into core and it compiles now. I Have about 40 errors
in the UI which I should be able to clear by the end of the day. I will then
upload the updates to SF.
Some comments.
1. I have added an Init function in Cosmos2 Init to init GameData. Is there
any data yet ?
2. Empire Control uses a hybrid between going through the wrapper UIEmpire
and direct via Core.Positions.Empire. Not clean but I dont have time to fix
it and consider the ramifications.
3. I saw this code . Now the compiler complains that there is no need for
the is as it is always of that type. I must also add that "is" and "as" are
nice in the OO world but be very carefull with them esecially for operators
( which can end up up everywhere) as they run very slowly.
public static bool operator==(UIResearchStatus x, UIResearchStatus y)
{
if (x is UIResearchStatus)
{
if (y is UIResearchStatus)
return x.empire == y.empire ;
else
return false ;
}
else
{
// x == null
if (y is UIResearchStatus)
return false ;
else
return true ;
}
}
|