static void Main(string[] args) { BigInt big; BigInt lit; BigInt Composit; big = Console.ReadLine(); lit = Console.ReadLine(); Composit = big * lit; Composit.Print(); Console.ReadKey(); }
public void TestShouldTurnAndMoveInTheRightDirection() { var map = new Map(5, 5); var tractor = new Tractor(map); var wind = new Wind(map, Orientation.North); var stone = new Stone(map, new Point(2, 3)); var testing = new Composit(map, new UnitCollection { tractor, wind, stone }); testing.ExecuteCommand(new TurnClockwiseCommand()); testing.ExecuteCommand(new MoveForwardCommand()); Assert.AreEqual(1, tractor.Position.X); Assert.AreEqual(0, tractor.Position.Y); testing.ExecuteCommand(new TurnClockwiseCommand()); testing.ExecuteCommand(new MoveForwardCommand()); Assert.AreEqual(1, tractor.Position.X); Assert.AreEqual(-1, tractor.Position.Y); testing.ExecuteCommand(new TurnClockwiseCommand()); testing.ExecuteCommand(new MoveForwardCommand()); Assert.AreEqual(0, tractor.Position.X); Assert.AreEqual(-1, tractor.Position.Y); testing.ExecuteCommand(new TurnClockwiseCommand()); testing.ExecuteCommand(new MoveForwardCommand()); Assert.AreEqual(0, tractor.Position.X); Assert.AreEqual(0, tractor.Position.Y); testing.ExecuteCommand(new TurnClockwiseCommand()); Assert.AreEqual(Orientation.East, wind.Orientation); testing.ExecuteCommand(new TurnClockwiseCommand()); Assert.AreEqual(Orientation.South, wind.Orientation); testing.ExecuteCommand(new TurnClockwiseCommand()); Assert.AreEqual(Orientation.West, wind.Orientation); testing.ExecuteCommand(new TurnClockwiseCommand()); Assert.AreEqual(Orientation.North, wind.Orientation); testing.ExecuteCommand(new MoveForwardCommand()); Assert.AreEqual(2, stone.Position.X); Assert.AreEqual(3, stone.Position.Y); testing.ExecuteCommand(new TurnClockwiseCommand()); Assert.AreEqual(2, stone.Position.X); Assert.AreEqual(3, stone.Position.Y); }
static void CompositDALToCompositBDO(CompositBDO compositBDO, Composit composit) { compositBDO.ALScore = composit.ALScore; compositBDO.AQLCode = composit.AQLCode; compositBDO.AQLLanguage = composit.AQLLanguage; compositBDO.Barcode = composit.Barcode; compositBDO.Citizenship = composit.Citizenship; compositBDO.Classification = composit.Classification; compositBDO.DOB = composit.DOB; compositBDO.DOT = composit.DOT; compositBDO.ALLevel = composit.ALLevel; compositBDO.Faculty = composit.Faculty; compositBDO.Faculty2 = composit.Faculty2; compositBDO.Faculty3 = composit.Faculty3; compositBDO.ForeignID = composit.ForeignID; compositBDO.Gender = composit.Gender; compositBDO.GR12Language = composit.GR12Language; compositBDO.HomeLanguage = (int?)Convert.ToInt32(composit.HomeLanguage); compositBDO.ID_Type = composit.ID_Type; compositBDO.Initials = composit.Initials; compositBDO.MatCode = composit.MatCode; compositBDO.MatLanguage = composit.MatLanguage; compositBDO.MATLevel = composit.MATLevel; compositBDO.MATScore = composit.MATScore; compositBDO.Name = composit.Name; compositBDO.QLLevel = composit.QLLevel; compositBDO.QLScore = composit.QLScore; compositBDO.RefNo = composit.RefNo; compositBDO.RowGuid = composit.RowGuid; compositBDO.RowVersion = composit.RowVersion; compositBDO.SAID = composit.SAID; compositBDO.Surname = composit.Surname; compositBDO.VenueName = composit.VenueName; compositBDO.VenueCode = composit.VenueCode; compositBDO.WroteAL = composit.WroteAL; compositBDO.WroteQL = composit.WroteQL; compositBDO.WroteMat = composit.WroteMat; compositBDO.DateModified = composit.DateModified; compositBDO.Batch = composit.Batch; }