public Wonders(byte[] dates, byte[] states) { allWonders = new List <Wonder>(16); for (int i = 0; i < 16; i++) { Wonder w = new Wonder(); w.Date = StupidDate.GetDateFromOffset(i, dates); w.Name = WonderList[i]; w.Discovered = (states[i / 8] & (0x01 << (i % 8))) > 0; allWonders.Add(w); } }
public Artefacts(byte[] dates, byte[] states) { allArtefacts = new List <Artefact>(48); for (int i = 0; i < 47; i++) { Artefact w = new Artefact(); w.Date = StupidDate.GetDateFromOffset(i, dates); w.Name = ArtefactList[i]; w.Discovered = (states[(i + 1) / 8] & (0x01 << ((i + 1) % 8))) > 0; allArtefacts.Add(w); } }
public Feats(byte[] dates, byte[] states) { allFeats = new List <Feat>(96); for (int i = 0; i < 96; i++) { Feat f = new Feat(); f.Date = StupidDate.GetDateFromOffset(i, dates); switch (i % 2) { case 1: f.State = (State)((states[i / 2] & 0xF0) >> 4); break; case 0: f.State = (State)((states[i / 2] & 0x0F)); break; } f.Name = FeatList[i]; allFeats.Add(f); } }