// SPAWN PLAYER private static void SpawnPlayer(int shipChoice) { int[] shipStats = new int[5]; shipStats[0] = shipChoice; shipStats[1] = 38; // starting horizontal coords 57 shipStats[2] = 34; // starting vertical coords shipStats[3] = Ships.GetHorizontalDimension(shipChoice); shipStats[4] = Ships.GetVerticalDimension(shipChoice); Ships.SpawnedShipsList.Add(shipStats); }
// DONE: SPAWN ENEMIES private static void SpawnEnemies(int ships) { for (int i = 1; i <= ships; i++) { int rollModel = rndm.Next(1, 3); int shipChoice = rollModel + 10; int[] shipStats = new int[5]; shipStats[0] = shipChoice; // starting horizontal coords: 17, 35, 53 shipStats[1] = 35; if (i % 2 == 0) { shipStats[1] = 17; } if (i % 3 == 0) { shipStats[1] = 53; } shipStats[2] = 5; // starting vertical coords shipStats[3] = Ships.GetHorizontalDimension(shipChoice); shipStats[4] = Ships.GetVerticalDimension(shipChoice); Ships.SpawnedShipsList.Add(shipStats); } }