
-----------------------------------
menglianyan
Wed May 17, 2006 9:41 am

Help!!!! How to draw a ship in turing???
-----------------------------------
i've got a serious prob!!
how to draw a ship (submarine) in turing?!!!
help!!
thx~

-----------------------------------
HellblazerX
Wed May 17, 2006 10:03 am


-----------------------------------
Well, you could draw the ship in paint and save it as a bitmap.  Then use Pic.FileNew () to load and draw it.  Or you could use the drawline and drawarc functions to draw on manually in Turing.

-----------------------------------
jamonathin
Wed May 17, 2006 11:02 am


-----------------------------------
What he also means is we aren't going to do it for you :).

-----------------------------------

Sat May 20, 2006 2:28 pm

Try This and Learn
-----------------------------------
If you know how to use an ARRAY and DRAW.POLYGON, then use that. If you don't know how, look at this code:


View.Set ("graphics")
var a : array 1 .. 9 of int := init (125, 100, 135, 165, 220, 220, 240, 165, 105)
var b : array 1 .. 9 of int := init (100, 125, 165, 165, 150, 100, 165, 100, 100)
var x, y, button : int
loop
    Mouse.Where (x, y, button)
    Text.Locate (1, 1)
    if button = 0 then
        put "x : ", x, "   y : ", y
    end if
    Draw.FillPolygon (a, b, 8, brightblue)
end loop


-----------------------------------
Remm
Sat May 20, 2006 8:06 pm


-----------------------------------
you could also use a whole lotta Draw. commands, with every move (if it even has to move) you'd need alot of changes, but hey - most basic way to do it. Involves alotta trail n error with placement, but has the desired effect. I'd go with paint if i were u.
