
-----------------------------------
air_force91
Sun Nov 16, 2003 5:43 pm

designing report card
-----------------------------------
alright here's what i don't get...how do i design a simple report card on turing? could u give me the code and explain it a bit coz im just learning the basics on turing and i need all the help i can get....thanx!

-----------------------------------
Tony
Sun Nov 16, 2003 6:22 pm


-----------------------------------
its all about the spacing and drawing tables with lines
 ____
|__|_|

heh...

you just stick :# at the end of string, where # is the size it will become (it will add spaces at the end of output).

here's an example

var name,age,other:string
name :="tony"
age :="17"
other := "compsci.ca"

put "| name | age | other         |"
put "|",name:6,"|",age:5,"|",other:15,"|"


-----------------------------------
hackman
Mon Nov 17, 2003 12:00 pm


-----------------------------------
and if you want to make it look realy nice, you can use drawline . If you want to learn more about drawline, open turring, type drawline, then hit F9. When i get home i can show you a score card i made for a Yahtzee game, its prety close to a report card.

-----------------------------------
air_force91
Mon Nov 17, 2003 1:16 pm


-----------------------------------
thanx!!!!!!  :) ...really helped!!!

-----------------------------------
air_force91
Mon Nov 17, 2003 1:23 pm


-----------------------------------
ok so i understand the drawline procedure...but what would i type in the brackets if i wanted a straight line to make a column? and do i have to declare the maxx?

-----------------------------------
Tony
Mon Nov 17, 2003 4:24 pm


-----------------------------------
maxx is a constant, you dont have to declear it.

as for drawing columns... You just have to figure out X/Y positions where you want to draw your lines. Using Font.Draw for your text will also help you greatly, as you'll be controling both X/Y position of the text and it's font size.

-----------------------------------
hackman
Mon Nov 17, 2003 8:13 pm


-----------------------------------
Well heres the scorecard. This is just the...first draft of it. It dosent have all the variables in it.

var username : string

colorback (black)
color (green)
cls
put "Enter Your Name"
get username
cls
    color (white)
    put username, "'s Score Card"
    color (green)
    put "Aces:"
    put "Twos:"
    put "Threes:"
    put "Fours:"
    put "Fives:"
    put "Sixes:"
    color (white)
    put "Total:"
    color (green)
    put "Bonus:"
    color (white)
    put "Total:"
    color (green)
    put ""

    put "3 of a kind:"
    put "4 of a kind:"
    put "Full House:"
    put "Small Straight:"
    put "Large Straight:"
    put "YAHTZEE:"
    put "Chance:"
    color (white)
    put "Total:"
    put ""
    put "GRAND TOTAL:"
    drawline (0, 382, maxx, 382, red)
    drawline (0, 367, maxx, 367, red)
    drawline (0, 352, maxx, 352, red)
    drawline (0, 335, maxx, 335, red)
    drawline (0, 319, maxx, 319, red)
    drawline (0, 303, maxx, 303, red)
    drawline (0, 288, maxx, 288, red)
    drawline (0, 271, maxx, 271, red)
    drawline (0, 256, maxx, 256, red)
    drawline (0, 222, maxx, 222, red)
    drawline (0, 207, maxx, 207, red)
    drawline (0, 191, maxx, 191, red)
    drawline (0, 175, maxx, 175, red)
    drawline (0, 159, maxx, 159, red)
    drawline (0, 143, maxx, 143, red)
    drawline (0, 127, maxx, 127, red)
    drawline (0, 111, maxx, 111, red)
    drawline (0, 79, maxx, 79, red)
    drawline (120, 0, 120, 382, red)

Its worth a look

-----------------------------------
Tendulkar
Thu Nov 27, 2003 10:29 pm

Re: designing report card
-----------------------------------
Try this code for your report card! May be it'll help you. :D 

Here Is the Code:

-----------------------------------
CjGaughan
Tue Dec 02, 2003 7:25 pm


-----------------------------------
Here's another one...I had to do it for class..used drawline etc. very simple.

can be used for any four classes...(user inputs data)

requirements are at beginning of code.

-----------------------------------
the_short1
Sat Jan 17, 2004 5:54 pm


-----------------------------------
funny.. Gaughan  ... the one we made in class... he wants tables and stuff...not Flaming CjGaughan (we in same class)....the marks.t is good for finding out the marks. maybe he can integrate into the yatzee score card so it puts data into tables....also if you want some nice line effects check out the turing Help under ASCII code... it has some line things like 
double lines and corners.... or Check out your Character map program in Windows... found under your start menu, in acessories...., in font Terminal.... it will show some cool stuff you can make in turing with the right ASCII codes....:D
