public static void SetArray(int x1, int x2, int axisValue, string axis, Scout ship) { //ShipArray[0] is bugged for some reason, this is temporary fix while I //figure out what is going on with the SetShipArray function ship.ShipArray[0] = x2 - 1; ship.ShipArray[1] = x2; ship.axisValue = axisValue; ship.axis = axis; }
public static void setShipArray(Ship ship, int[] arr, int axisValue, string cons) { if (arr.Length == 2) { Scout.SetArray(arr[0], arr[1], axisValue, cons, (Scout)ship); } else { Battleship.SetArray(arr[0], arr[1], arr[2], arr[3], axisValue, cons, (Battleship)ship); } }