-
Notifications
You must be signed in to change notification settings - Fork 0
/
pirate-ship.bas
84 lines (68 loc) · 1.5 KB
/
pirate-ship.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
LET red 13583410
LET lightRed 16541523
LET blue 7574225
LET white 16777215
LET brown 7355966
LET lightBrown 9393750
LET grey 10921638
LET lightGrey 12105912
LET height 800
LET width 800
LET seaLevel (height/4)*3
FOR x 0 TO width-1
FOR y 0 TO height-1
IF y > seaLevel THEN LET color blue ELSE LET color white
PLOT x y color
NEXT y
NEXT x
LET startAt width/20
LET diagonalLen width/6
LET sink 25
LET borderWidth 4
FOR c 0 TO diagonalLen
LET y (seaLevel + c) - diagonalLen + sink
FOR f startAt + c TO width - (startAt + c)
PLOT f y brown
NEXT f
LET x startAt + c
FOR depth 0 TO borderWidth
LET ywithDepth y + depth
PLOT x ywithDepth lightBrown
PLOT width - x ywithDepth lightBrown
NEXT depth
NEXT c
LET lowestX (startAt + diagonalLen)
LET y seaLevel + sink
FOR x lowestX TO (width - lowestX)
FOR depth 0 TO borderWidth
PLOT x y + depth lightBrown
NEXT depth
NEXT x
LET boatTop seaLevel - diagonalLen + sink
FOR x startAt TO (width - startAt)
FOR depth 0 TO borderWidth
PLOT x boatTop-depth lightBrown
NEXT depth
NEXT x
LET poleXStart startAt*4+10
LET poleWidth 5
FOR y height/3-50 TO boatTop-borderWidth-1
FOR depth 0 TO 3
PLOT poleXStart-depth y lightGrey
PLOT poleXStart-depth y lightGrey
NEXT depth
FOR depth 0 TO poleWidth
PLOT poleXStart+depth y grey
NEXT depth
NEXT y
LET flagEnd width/2 + poleXStart
FOR y height/3-50 TO boatTop-80
FOR x poleXStart + poleWidth + 1 TO flagEnd
PLOT x y red
NEXT x
NEXT y
FOR depth 0 TO 2
FOR x poleXStart + poleWidth + 1 TO flagEnd
PLOT x y+depth lightRed
NEXT x
NEXT depth