Computer Science Canada

Help!!!! How to draw a ship in turing???

Author:  menglianyan [ Wed May 17, 2006 9:41 am ]
Post subject:  Help!!!! How to draw a ship in turing???

i've got a serious prob!!
how to draw a ship (submarine) in turing?!!!
help!!
thx~

Author:  HellblazerX [ Wed May 17, 2006 10:03 am ]
Post subject: 

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.

Author:  jamonathin [ Wed May 17, 2006 11:02 am ]
Post subject: 

What he also means is we aren't going to do it for you Smile.

Author:  Anonymous [ Sat May 20, 2006 2:28 pm ]
Post subject:  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:

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

Author:  Remm [ Sat May 20, 2006 8:06 pm ]
Post subject: 

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.


: