예제 #1
0
 public void TestCreation()
 {
     var ship = new Ship(Guid.NewGuid(), new Pose(new Vector3(2, 3, 4), Vector3.UnitX, Vector3.UnitY));
     Assert.AreEqual(new Vector3(2, 3, 4), ship.Pose.Location);
     Assert.AreEqual(new Vector3(1, 0, 0), ship.Pose.Front);
     Assert.AreEqual(new Vector3(0, 1, 0), ship.Pose.Up);
     Assert.AreEqual(new Vector3(0, 0, 1), ship.Pose.Right);
 }
예제 #2
0
 public void Modified_Wobs()
 {
     var planet2 = new Planet(_planet.ID, "Jupiter");
     var ship2 = new Ship(_ship.ID, _ship.Pose.Move(new Vector3(50, 0, 0), 0, 0, 0));
     AssertDiffAndPatch(
         World.Empty.SetWob(_planet).SetWob(_ship),
         World.Empty.SetWob(planet2).SetWob(ship2),
         d =>
         {
             CollectionAssert.AreEquivalent(new Wob[] { _planet, _ship }, d.Wobs.Removed.Values);
             CollectionAssert.AreEquivalent(new Wob[] { planet2, ship2 }, d.Wobs.Added.Values);
         });
 }
예제 #3
0
 public void Setup()
 {
     _planet = new Planet(Guid.NewGuid(), "Earth");
     _station = new Station(Guid.NewGuid(), new Vector3(10, 0, 20));
     _ship = new Ship(Guid.NewGuid(), new Pose(new Vector3(5, 6, 7), Vector3.UnitX, Vector3.UnitY));
     _inventory = new Inventory(Guid.NewGuid());
     _playerID = Guid.NewGuid();
     _shipID = Guid.NewGuid();
 }