first step in revamping

This commit is contained in:
tTh
2026-06-02 18:20:09 +02:00
parent 8e14ec2c8d
commit 7ef447b0d8
10 changed files with 58 additions and 43 deletions

View File

@@ -66,27 +66,29 @@ subroutine create_some_planets(planets, coef, sx, sy)
fmt = "(I4, ' | ', 2(F10.2, ' '), ' | ', 2F9.3, ' ', e12.3, I7)"
do foo=1, ubound(planets, 1)
if (foo .EQ. 1) then
!-
! the first planet is the home of Johnny Root
!-
planets(1)%posx = sx / 2
planets(1)%posy = sy / 2
planets(1)%mass = 31e8
planets(1)%mass = 7.12e3 + coef*foo*8.6
planets(1)%serial = 1337
planets(1)%speed = 6.666
else
do foo=2, ubound(planets, 1)
!-
! others are planets for peones
!-
planets(foo)%posx = rand() * real(sx-1)
planets(foo)%posy = rand() * real(sy-1)
planets(foo)%mass = 7.12e6 + coef*foo*3
planets(foo)%mass = 7.12e3 + coef*foo*3
planets(foo)%heading = 2 * 3.141592654 * rand()
if (rand() .LT. 0.15) planets(foo)%speed = 3.14159
if (rand() .LT. 0.15) then
planets(foo)%speed = rand() * 2.0
else
planets(foo)%speed = rand() + 0.5
endif
planets(foo)%serial = foo*2 + 120
endif
write (*, fmt) foo, planets(foo)
enddo