MegiRicky

vectorVLScontrol.lua

Nov 16th, 2024 (edited)
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.58 KB | None | 0 0
  1. local radar = peripheral.find("sp_radar")
  2. local modem = peripheral.find("modem")
  3.  
  4. redstone.setOutput("front",false)
  5. redstone.setOutput("left",false)
  6. redstone.setOutput("bottom",false)
  7. redstone.setOutput("right",false)
  8. redstone.setOutput("back",false)
  9. redstone.setOutput("top",false)
  10.  
  11. local controls = {}
  12. local target = {}
  13. local lockedId = nil
  14. local targetPos, targetVel, TargetYaw, TargetPitch
  15. local Kp_yaw, Ki_yaw, Kd_yaw = 0.15, 0.008, -0.001
  16. local Kp_pitch, Ki_pitch, Kd_pitch = 0.25, 0.03, -0.002
  17. local K_pitchDiff, k_heightDiff = 1,0.5
  18. local projectedMissileY,yLevelDiff,initialDistance,targetAltitude
  19. local closestDistance = math.huge
  20.  
  21. -- Initialize error, integral, and derivative terms for yaw and pitch
  22. local yawError = 0
  23. local yawIntegral = 0
  24. local yawPrevError = 0
  25.  
  26. local pitchError = 0
  27. local pitchIntegral = 0
  28. local pitchHeightPrevError = 0
  29.  
  30. local dt = 0.1
  31. print("Input the missile id, eg:1, default: 1")
  32. local missileId = io.read()
  33. if missileId == "" then
  34. missileId = 1
  35. end
  36. missileId = tonumber(missileId)
  37.  
  38. local controlsChannel = 1300
  39. local throttleChannel = controlsChannel + missileId
  40. print("throttleChannel: "..throttleChannel)
  41. if modem then
  42. modem.open(controlsChannel)
  43. modem.open(throttleChannel)
  44. end
  45.  
  46. local function normalizeVector(v)
  47. local length = math.sqrt(v[1] * v[1] + v[2] * v[2] + v[3] * v[3])
  48. if length == 0 then
  49. return {0, 0, 0}
  50. end
  51. return {v[1] / length, v[2] / length, v[3] / length}
  52. end
  53.  
  54. -- Function to normalize the rotation matrix
  55. local function normalizeRotationMatrix(rotMatrix)
  56. local normalizedMatrix = {}
  57. for i = 1, #rotMatrix do
  58. normalizedMatrix[i] = normalizeVector(rotMatrix[i])
  59. end
  60. return normalizedMatrix
  61. end
  62.  
  63. -- Modified getPitch function to use the normalized rotation matrix
  64. function getPitch()
  65. local rotMatrix = ship.getRotationMatrix()
  66. local normalizedMatrix = normalizeRotationMatrix(rotMatrix)
  67. return -math.asin(normalizedMatrix[2][3])
  68. end
  69.  
  70.  
  71. local function modemMessage()
  72. while true do
  73. if modem then
  74. local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
  75. if channel == controlsChannel then
  76. controls = message
  77. end
  78. else
  79. sleep()
  80. end
  81. end
  82. end
  83.  
  84. local function PIDController(Kp, Ki, Kd, error, integral, derivative, prevError, dt)
  85. -- Calculate the proportional, integral, and derivative components
  86. local proportional = Kp * error
  87. integral = integral + error * dt
  88. derivative = (error - prevError) / dt
  89.  
  90. -- Calculate output
  91. local output = proportional + (Ki * integral) + (Kd * derivative)
  92.  
  93. -- Return the PID output and updated integral and previous error
  94. return output, integral, error
  95. end
  96.  
  97. local function calculateProjectedY(currentY, currentPitch, currentVelocity, distance)
  98. -- Convert pitch to radians for calculation
  99. local pitchRad = math.rad(currentPitch)
  100. -- Estimate the change in Y based on the pitch, velocity, and distance
  101. local projectedY = currentY + math.tan(pitchRad) * distance
  102. return projectedY
  103. end
  104.  
  105. parallel.waitForAny(
  106. function()
  107. while true do
  108. print("controls: "..textutils.serialize(controls))
  109. if controls and controls.fireMissile and controls.fireMissile[missileId] and controls.fireMissile[missileId].launch == true then
  110. target = controls.fireMissile[missileId]
  111. print("launching")
  112. break
  113. end
  114. sleep()
  115. end
  116. end,
  117. modemMessage
  118. )
  119. print("Scaning for target")
  120.  
  121. --lock on
  122. local targetPos = ship.getWorldspacePosition()
  123. sleep(0.01)
  124. local targetVel = ship.getVelocity()
  125. targetPos.x = targetPos.x + targetVel.x * 2
  126. targetPos.z = targetPos.z + targetVel.y * 2
  127.  
  128. local yaw = math.deg(ship.getYaw())
  129. local pitch = math.deg(ship.getPitch()) * (90/28.6478)
  130.  
  131. local results = radar.scanForShips(3000)
  132. local displayData = {}
  133. print(results)
  134.  
  135. if target.type == "ship" then
  136. if not results or #results == 0 then
  137. table.insert(displayData, "No objects detected.")
  138. else
  139. local smallestCombinedDiff = math.huge -- Initialize with a large value
  140. local finalTargetYaw = nil
  141. local finalTargetPitch = nil
  142. local finalDistance = nil
  143. local closestDistanceWithSmallDiff = math.huge -- New variable for closest distance with small combined diff
  144.  
  145. -- Assuming 'yaw' and 'pitch' are the current ship's yaw and pitch angles
  146. local pos = ship.getWorldspacePosition()
  147. local yaw = math.deg(ship.getYaw()) + 180
  148. if yaw > 360 then yaw = yaw - 360 end
  149. local pitch = math.deg(getPitch())
  150.  
  151. for i, object in ipairs(results) do
  152. if object.mass > 1000 then
  153. -- Calculate dx, dy, dz from ship to object
  154. local dx = object.pos.x - pos.x
  155. local dy = object.pos.y - pos.y
  156. local dz = object.pos.z - pos.z
  157.  
  158. -- Calculate bearing (yaw) from ship to object
  159. local angleFromSouth = math.atan2(dx, dz)
  160. local bearingFromSouth = math.deg(angleFromSouth)
  161. local targetYaw = (180 - bearingFromSouth) % 360
  162.  
  163. -- Calculate yaw difference
  164. local yawDiff = (targetYaw - yaw + 180) % 360 - 180
  165.  
  166. -- Calculate pitch difference
  167. local horizontalDistance = math.sqrt(dx * dx + dz * dz)
  168. local targetPitch = math.deg(math.atan2(dy, horizontalDistance))
  169. local pitchDiff = targetPitch - (-pitch)
  170.  
  171. -- Calculate the Euclidean distance (for prioritization)
  172. local distance = math.sqrt(dx * dx + dy * dy + dz * dz)
  173.  
  174. -- Combine yaw and pitch differences into a single score (weighted sum or simply adding)
  175. local combinedDiff = math.abs(yawDiff) + math.abs(pitchDiff)
  176.  
  177. -- Additional logic: If combinedDiff is less than 20, lock onto the closest target
  178. if object.id == target.id then
  179. closestDistanceWithSmallDiff = distance
  180. lockedId = object.id
  181. intialPosition = object.pos
  182. initialDistance = horizontalDistance
  183. print("Target with combinedDiff < 20, Distance: ", distance, " Locked target ID: ", object.id)
  184. end
  185. end
  186. end
  187.  
  188. if lockedId and intialPosition then
  189. print("Closest Object ID:", lockedId)
  190. print("X: "..intialPosition.x.." Y: "..intialPosition.y.." Z: "..intialPosition.z)
  191. print("initialDistance: "..initialDistance)
  192. else
  193. print("No large objects detected.")
  194. end
  195. end
  196. else
  197. local pos = ship.getWorldspacePosition()
  198. local dx = target.pos.x - pos.x
  199. local dy = target.pos.y - pos.y
  200. local dz = target.pos.z - pos.z
  201. local distance = math.sqrt(dx * dx + dy * dy + dz * dz)
  202. intialPosition = target.pos
  203. initialDistance = math.sqrt(dx * dx + dz * dz)
  204. end
  205.  
  206. print("Locked Target:", lockedId)
  207. print("X: "..intialPosition.x.." Y: "..intialPosition.y.." Z: "..intialPosition.z)
  208. modem.transmit(throttleChannel, 0, 5)
  209. sleep(1.3)
  210. modem.transmit(throttleChannel, 0, 0)
  211.  
  212. local function initial()
  213. local results = radar.scanForShips(2000)
  214. pos = ship.getWorldspacePosition()
  215. local yaw = math.deg(ship.getYaw()) + 180
  216. if yaw>360 then yaw = yaw - 360 end
  217. local missileVelocity = ship.getVelocity()
  218. local misisleSpeed = math.sqrt(missileVelocity.x ^ 2 + missileVelocity.y ^ 2 + missileVelocity.z ^ 2)
  219. local pitch = math.deg(getPitch())
  220. local flightControl = {
  221. pitchUp = nil, pitchDown, yawLeft = nil, yawRight = nil, throttle = nil
  222. }
  223. print("pitch: "..pitch)
  224.  
  225. if target.type == "ship" then
  226. for i, object in ipairs(results) do
  227. if object.id == lockedId then
  228. targetPos = object.pos
  229. targetVel = object.velocity
  230. local dx = targetPos.x - pos.x
  231. local dy = targetPos.y - pos.y
  232. local dz = targetPos.z - pos.z
  233. local immediateDistance = math.sqrt(dx * dx + dy * dy + dz * dz)
  234. missileSpeed = math.sqrt(missileVelocity.x^2 + missileVelocity.y^2 + missileVelocity.z^2)
  235. if missileSpeed < 0.1 then missileSpeed = 0.1 end
  236.  
  237. -- Update pitch, yaw, and distance
  238. local estimateTime = immediateDistance/missileSpeed
  239. local estimateX = targetPos.x + targetVel.x * math.min(estimateTime,1)
  240. local estimateY = targetPos.y + targetVel.y * math.min(estimateTime,1)
  241. local estimateZ = targetPos.z + targetVel.z * math.min(estimateTime,1)
  242.  
  243. local dx = estimateX - pos.x
  244. local dy = estimateY - pos.y
  245. local dz = estimateZ - pos.z
  246.  
  247. local targetHorizontalDistance = math.sqrt(dx * dx + dz * dz)
  248.  
  249. TargetYaw = math.deg(math.atan2(-dx, dz))
  250. TargetYaw = (TargetYaw + 180) % 360
  251.  
  252. projectedMissileY = pos.y + missileVelocity.y * estimateTime
  253. yLevelDiff = targetPos.y - projectedMissileY
  254. TargetPitch = math.deg(math.atan2(dy, targetHorizontalDistance))
  255.  
  256. targetAltitude = targetPos.y
  257.  
  258. yawError = TargetYaw - yaw
  259. pitchError = TargetPitch - (-pitch)
  260. pitchHeightDiff = pitchError * K_pitchDiff + yLevelDiff * k_heightDiff
  261.  
  262. -- Output diagnostics
  263. end
  264. end
  265. elseif target.type == "waypoint" then
  266. targetPos = target.pos
  267.  
  268. local dx = targetPos.x - pos.x
  269. local dy = targetPos.y - pos.y
  270. local dz = targetPos.z - pos.z
  271. local immediateDistance = math.sqrt(dx * dx + dy * dy + dz * dz)
  272. missileSpeed = math.sqrt(missileVelocity.x^2 + missileVelocity.y^2 + missileVelocity.z^2)
  273. if missileSpeed < 0.1 then missileSpeed = 0.1 end
  274.  
  275. local estimateTime = immediateDistance/missileSpeed
  276.  
  277. local targetHorizontalDistance = math.sqrt(dx * dx + dz * dz)
  278.  
  279. TargetYaw = math.deg(math.atan2(-dx, dz))
  280. TargetYaw = (TargetYaw + 180) % 360
  281.  
  282. projectedMissileY = pos.y + missileVelocity.y * estimateTime
  283. yLevelDiff = targetPos.y - projectedMissileY
  284. TargetPitch = math.deg(math.atan2(dy, targetHorizontalDistance))
  285.  
  286. targetAltitude = targetPos.y
  287.  
  288. yawError = TargetYaw - yaw
  289. pitchError = TargetPitch - (-pitch)
  290. pitchHeightDiff = pitchError * K_pitchDiff + yLevelDiff * k_heightDiff
  291. print(pitch)
  292. end
  293.  
  294. -- Ensure yaw is between -180 and 180 for error
  295. if yawError > 180 then
  296. yawError = yawError - 360
  297. elseif yawError < -180 then
  298. yawError = yawError + 360
  299. end
  300.  
  301. -- PID control for yaw
  302. local yawOutput, yawIntegral, yawPrevError = PIDController(Kp_yaw, Ki_yaw, Kd_yaw, yawError, yawIntegral, (yawError - yawPrevError), yawPrevError, dt)
  303. yawOutput = math.min(math.max(yawOutput, -15), 15)
  304. if -pitch > 30 or pos.y - targetAltitude > 50 then
  305. pitchOutput = -1
  306. else
  307. pitchOutput = 3
  308. end
  309.  
  310. --yaw and pitch flight control
  311. if yawOutput > 0 then
  312. redstone.setOutput("right", true)
  313. redstone.setOutput("left", false)
  314. redstone.setAnalogOutput("right", math.abs(yawOutput))
  315. elseif yawOutput < 0 then
  316. redstone.setOutput("left", true)
  317. redstone.setOutput("right", false)
  318. redstone.setAnalogOutput("left", math.abs(yawOutput))
  319. else
  320. redstone.setOutput("right", false)
  321. redstone.setOutput("left", false)
  322. end
  323.  
  324. if pitchOutput > 0.1 then
  325. local adjustedPitchOutput = math.max(math.abs(pitchOutput),1)
  326. redstone.setOutput("top", true)
  327. redstone.setOutput("bottom", false)
  328. redstone.setAnalogOutput("top", math.min(adjustedPitchOutput, 15))
  329. elseif pitchOutput < -0.1 then
  330. local adjustedPitchOutput = math.max(math.abs(pitchOutput),1)
  331. redstone.setOutput("bottom", true)
  332. redstone.setOutput("top", false)
  333. redstone.setAnalogOutput("bottom", math.min(adjustedPitchOutput, 15))
  334. else
  335. redstone.setOutput("top", false)
  336. redstone.setOutput("bottom", false)
  337. end
  338.  
  339.  
  340. --throttle control
  341. if missileSpeed < 60 then
  342. modem.transmit(throttleChannel, 0, 2) -- Increase throttle
  343. else
  344. modem.transmit(throttleChannel, 0, 0)
  345. end
  346. end
  347.  
  348. local function terminal()
  349. local results = radar.scanForShips(2000)
  350. pos = ship.getWorldspacePosition()
  351. local yaw = math.deg(ship.getYaw()) + 180
  352. if yaw>360 then yaw = yaw - 360 end
  353. local missileVelocity = ship.getVelocity()
  354. local misisleSpeed = math.sqrt(missileVelocity.x ^ 2 + missileVelocity.y ^ 2 + missileVelocity.z ^ 2)
  355. local pitch = math.deg(getPitch())
  356. local flightControl = {
  357. pitchUp = nil, pitchDown, yawLeft = nil, yawRight = nil, throttle = nil
  358. }
  359. local targetSpeed = 0
  360.  
  361. if target.type == "ship" then
  362. for i, object in ipairs(results) do
  363. if object.id == lockedId then
  364. -- Update position and targetVel
  365. targetPos = object.pos
  366. targetVel = object.velocity
  367. targetSpeed = math.sqrt(targetVel.x^2 + targetVel.y^2 + targetVel.z^2)
  368. local dx = targetPos.x - pos.x
  369. local dy = targetPos.y - pos.y
  370. local dz = targetPos.z - pos.z
  371. local immediateDistance = math.sqrt(dx * dx + dy * dy + dz * dz)
  372. missileSpeed = math.sqrt(missileVelocity.x^2 + missileVelocity.y^2 + missileVelocity.z^2)
  373. if missileSpeed < 0.1 then missileSpeed = 0.1 end
  374.  
  375. -- Update pitch, yaw, and distance
  376. local estimateTime = immediateDistance/missileSpeed
  377. --[[local estimateX = targetPos.x + targetVel.x * math.min(estimateTime,2)
  378. local estimateY = targetPos.y + targetVel.y * math.min(estimateTime,2)
  379. local estimateZ = targetPos.z + targetVel.z * math.min(estimateTime,2)
  380.  
  381. local dx = estimateX - pos.x
  382. local dy = estimateY - pos.y
  383. local dz = estimateZ - pos.z--]]
  384.  
  385. local targetHorizontalDistance = math.sqrt(dx * dx + dz * dz)
  386.  
  387. TargetYaw = math.deg(math.atan2(-dx, dz))
  388. TargetYaw = (TargetYaw + 180) % 360
  389.  
  390. projectedMissileY = pos.y + missileVelocity.y * estimateTime
  391. yLevelDiff = targetPos.y - projectedMissileY
  392. TargetPitch = math.deg(math.atan2(dy, targetHorizontalDistance))
  393.  
  394. yawError = TargetYaw - yaw
  395. pitchError = TargetPitch - (-pitch)
  396.  
  397. pitchHeightDiff = pitchError * K_pitchDiff + yLevelDiff * k_heightDiff
  398. print(pitch)
  399. -- Output diagnostics
  400. end
  401. end
  402. elseif target.type == "waypoint" then
  403. -- Update position and targetVel
  404. targetPos = target.pos
  405.  
  406. local dx = targetPos.x - pos.x
  407. local dy = targetPos.y - pos.y
  408. local dz = targetPos.z - pos.z
  409. local immediateDistance = math.sqrt(dx * dx + dy * dy + dz * dz)
  410. missileSpeed = math.sqrt(missileVelocity.x^2 + missileVelocity.y^2 + missileVelocity.z^2)
  411. if missileSpeed < 0.1 then missileSpeed = 0.1 end
  412.  
  413. -- Update pitch, yaw, and distance
  414. local estimateTime = immediateDistance/missileSpeed
  415.  
  416. local targetHorizontalDistance = math.sqrt(dx * dx + dz * dz)
  417.  
  418. TargetYaw = math.deg(math.atan2(-dx, dz))
  419. TargetYaw = (TargetYaw + 180) % 360
  420.  
  421. projectedMissileY = pos.y + missileVelocity.y * estimateTime
  422. yLevelDiff = targetPos.y - projectedMissileY
  423. TargetPitch = math.deg(math.atan2(dy, targetHorizontalDistance))
  424.  
  425. yawError = TargetYaw - yaw
  426. pitchError = TargetPitch - (-pitch)
  427.  
  428. pitchHeightDiff = pitchError * K_pitchDiff + yLevelDiff * k_heightDiff
  429. end
  430.  
  431. -- Ensure yaw is between -180 and 180 for error
  432. if yawError > 180 then
  433. yawError = yawError - 360
  434. elseif yawError < -180 then
  435. yawError = yawError + 360
  436. end
  437.  
  438. -- PID control for yaw
  439. local yawOutput, yawIntegral, yawPrevError = PIDController(Kp_yaw, Ki_yaw, Kd_yaw, yawError, yawIntegral, (yawError - yawPrevError), yawPrevError, dt)
  440. yawOutput = math.min(math.max(yawOutput, -15), 15)
  441.  
  442. -- PID control for pitch
  443. local pitchOutput, pitchIntegral, pitchHeightPrevError = PIDController(Kp_pitch, Ki_pitch, Kd_pitch, pitchHeightDiff, pitchIntegral, (pitchHeightDiff - pitchHeightPrevError), pitchHeightPrevError, dt)
  444. pitchOutput = math.min(math.max(pitchOutput, -15), 15)
  445. print("yawOutput: "..yawOutput.." pitchOutput: "..pitchOutput)
  446.  
  447. --yaw and pitch flight control
  448. if yawOutput > 0 then
  449. redstone.setOutput("right", true)
  450. redstone.setOutput("left", false)
  451. redstone.setAnalogOutput("right", math.abs(yawOutput))
  452. elseif yawOutput < 0 then
  453. redstone.setOutput("left", true)
  454. redstone.setOutput("right", false)
  455. redstone.setAnalogOutput("left", math.abs(yawOutput))
  456. else
  457. redstone.setOutput("right", false)
  458. redstone.setOutput("left", false)
  459. end
  460.  
  461. if pitchOutput > 0.1 then
  462. local adjustedPitchOutput = math.max(math.abs(pitchOutput),1)
  463. redstone.setOutput("top", true)
  464. redstone.setOutput("bottom", false)
  465. redstone.setAnalogOutput("top", math.min(adjustedPitchOutput, 15))
  466. elseif pitchOutput < -0.1 then
  467. local adjustedPitchOutput = math.max(math.abs(pitchOutput),1)
  468. redstone.setOutput("bottom", true)
  469. redstone.setOutput("top", false)
  470. redstone.setAnalogOutput("bottom", math.min(adjustedPitchOutput, 15))
  471. else
  472. redstone.setOutput("top", false)
  473. redstone.setOutput("bottom", false)
  474. end
  475.  
  476. --throttle control
  477. if (missileSpeed < 2 * targetSpeed or missileSpeed < 40) and missileSpeed < 70 then
  478. modem.transmit(throttleChannel, 0, 2) -- Apply throttle to increase speed
  479. print("Increasing throttle: Missile speed is less than 2x target speed")
  480. else
  481. modem.transmit(throttleChannel, 0, 0) -- Maintain current throttle
  482. print("Maintaining throttle: Missile speed is sufficient")
  483. end
  484. end
  485.  
  486. local function fuze()
  487. local results = radar.scanForShips(2000)
  488. pos = ship.getWorldspacePosition()
  489. local distance
  490. if target.type == "ship" then
  491. for i, object in ipairs(results) do
  492. if object.id == lockedId then
  493. targetPos = object.pos
  494. local dx = targetPos.x - pos.x
  495. local dy = targetPos.y - pos.y
  496. local dz = targetPos.z - pos.z
  497.  
  498. distance = math.sqrt(dx * dx + dy * dy +dz * dz)
  499. end
  500. end
  501. elseif target.type == "waypoint" then
  502. local dx = target.pos.x - pos.x
  503. local dy = target.pos.y - pos.y
  504. local dz = target.pos.z - pos.z
  505. distance = math.sqrt(dx * dx + dy * dy +dz * dz)
  506. end
  507. --proximity fuze
  508. if distance > closestDistance and distance < 15 then
  509. print("detonating")
  510. redstone.setOutput("back",true)
  511. sleep(0.1)
  512. redstone.setOutput("front",false)
  513. redstone.setOutput("left",false)
  514. redstone.setOutput("bottom",false)
  515. redstone.setOutput("right",false)
  516. redstone.setOutput("back",false)
  517. redstone.setOutput("top",false)
  518. modem.transmit(throttleChannel, 0, 0)
  519. error("detonated")
  520. else
  521. closestDistance = distance
  522. end
  523. --impact fuze
  524. if redstone.getInput("front") then
  525. print("detonating")
  526. redstone.setOutput("back",true)
  527. sleep(0.1)
  528. redstone.setOutput("front",false)
  529. redstone.setOutput("left",false)
  530. redstone.setOutput("bottom",false)
  531. redstone.setOutput("right",false)
  532. redstone.setOutput("back",false)
  533. redstone.setOutput("top",false)
  534. modem.transmit(throttleChannel, 0, 0)
  535. error("detonated")
  536. end
  537. end
  538.  
  539. while true do
  540. local results = radar.scanForShips(2000)
  541. pos = ship.getWorldspacePosition()
  542. local targetSpeed = 0
  543.  
  544. if target.type == "ship" then
  545. for i, object in ipairs(results) do
  546. if object.id == lockedId then
  547. targetPos = object.pos
  548. targetVel = object.velocity
  549. targetSpeed = math.sqrt(targetVel.x^2 + targetVel.y^2 + targetVel.z^2)
  550.  
  551. local dx = targetPos.x - pos.x
  552. local dy = targetPos.y - pos.y
  553. local dz = targetPos.z - pos.z
  554. horizontalDistance = math.sqrt(dx * dx + dz * dz)
  555. end
  556. end
  557. elseif target.type == "waypoint" then
  558. local dx = target.pos.x - pos.x
  559. local dy = target.pos.y - pos.y
  560. local dz = target.pos.z - pos.z
  561. horizontalDistance = math.sqrt(dx * dx + dz * dz)
  562. end
  563.  
  564. print("horizontalDistance: "..horizontalDistance)
  565. print("targetSpeed: "..targetSpeed)
  566.  
  567. -- Check conditions for terminal phase
  568. if horizontalDistance < 150 or targetSpeed > 15 then
  569. print("terminal phrase")
  570. terminal()
  571. fuze()
  572. else
  573. print("initial phrase")
  574. initial()
  575. end
  576. end
  577.  
  578.  
  579.  
  580.  
  581.  
Advertisement
Add Comment
Please, Sign In to add comment