public void TestMethod1() { DAOMap myDaoMap = JsonDAOMap.getInstance(); Map expectedMap = new Map(1, 3, 3, new BaseField[3, 3] { { new Obstacle(), new Street(), new Obstacle() }, { new Obstacle(), new Street(), new Obstacle() }, { new Obstacle(), new Street(), new Obstacle() } }, true); Map loadedMap = myDaoMap.LoadMap(1); Assert.AreEqual(expectedMap, loadedMap); }
public void Start() { //get map CurrentMap = DAOMap.LoadMap(mapIndex); //scan map for traffic lights and starting positions scanMapForTrafficLights(); scanMapForStartPoints(); //initialize CarEngine carEngine = new CarEngine(); //initialize gameloop Timer gameTicker = new Timer(500); gameTicker.Elapsed += gameLoop; //start gameloop gameTicker.Start(); }