public void getShips(SpacegameServer.Core.Core _core, int _shipId, SpacegameServer.Core.User _user) { int DefaultUser = 0; int shipId1 = (int)_core.identities.shipLock.getNext(); SpacegameServer.Core.Ship Ship1; Ship1 = new SpacegameServer.Core.Ship(shipId1); Ship1.userid = DefaultUser; Ship1.posX = 5000; Ship1.posY = 5000; _core.ships[shipId1] = Ship1; _core.addShipToField(Ship1); ((SpacegameServer.Core.User)_core.users[DefaultUser]).ships.Add(Ship1); shipId1 = (int)_core.identities.shipLock.getNext(); Ship1 = new SpacegameServer.Core.Ship(shipId1); Ship1.userid = DefaultUser; Ship1.posX = 5001; Ship1.posY = 5001; _core.ships[shipId1] = Ship1; _core.addShipToField(Ship1); ((SpacegameServer.Core.User)_core.users[DefaultUser]).ships.Add(Ship1); }
public void TestLockable() { SpacegameServer.Core.Core Instance = SpacegameServer.Core.Core.Instance; SpacegameServer.Core.User x = Mock.MockUserAndAdd(Instance); int shipId1 = (int)Instance.identities.shipLock.getNext(); int shipId2 = (int)Instance.identities.shipLock.getNext(); SpacegameServer.Core.Ship Ship1, Ship2; Ship1 = new SpacegameServer.Core.Ship(shipId1); Ship2 = new SpacegameServer.Core.Ship(shipId2); SpacegameServer.Core.Colony Colony1; Colony1 = new SpacegameServer.Core.Colony(1); //Object can only be locked once Assert.IsTrue(Ship1.setLock()); Assert.IsFalse(Ship1.setLock()); //LockAll of Ships can only be set once Assert.IsTrue(SpacegameServer.Core.Ship.setLockAll()); Assert.IsFalse(SpacegameServer.Core.Ship.setLockAll()); //ships can't be lcoked anymore, colonies can Assert.IsFalse(Ship1.setLock()); Assert.IsFalse(Ship2.setLock()); Assert.IsTrue(Colony1.setLock()); Ship1.removeLock(); Colony1.removeLock(); //after removing LockAll, all is lockable again SpacegameServer.Core.Ship.removeLockAll(); Assert.IsTrue(Ship1.setLock()); Assert.IsTrue(Ship2.setLock()); Assert.IsTrue(Colony1.setLock()); }
public void DeleteCommNodeUsers(SpacegameServer.Core.CommunicationNode node, SpacegameServer.Core.User user) { }
public void userSaveFog(SpacegameServer.Core.User user) { }
public void SaveUserResearch(SpacegameServer.Core.Core instance, SpacegameServer.Core.User user, List <SpacegameServer.Core.UserResearch> NewUserResearch, List <SpacegameServer.Core.UserQuest> NewQuests) { }
public void saveUser(SpacegameServer.Core.User user) { }
public void getUserResearches(SpacegameServer.Core.Core _core, SpacegameServer.Core.User _user) { }
public void getUserQuests(SpacegameServer.Core.Core _core, SpacegameServer.Core.User _user) { }
public void getShips(SpacegameServer.Core.Core _core, int _shipId, SpacegameServer.Core.User _user) { }
public void getShipTemplates(SpacegameServer.Core.Core _core, int templateId, SpacegameServer.Core.User _user) { }
public void getShipTemplates(SpacegameServer.Core.Core _core, int templateId, SpacegameServer.Core.User _user) { var newTemplateId = (int)_core.identities.templateLock.getNext(); var Template = Mock.mockShipTemplate(newTemplateId, 0); _core.shipTemplate.TryAdd(newTemplateId, Template); }