Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 designing report card
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
air_force91




PostPosted: Sun Nov 16, 2003 5:43 pm   Post subject: 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!
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Nov 16, 2003 6:22 pm   Post subject: (No subject)

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
code:

var name,age,other:string
name :="tony"
age :="17"
other := "compsci.ca"

put "| name | age | other         |"
put "|",name:6,"|",age:5,"|",other:15,"|"
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
hackman




PostPosted: Mon Nov 17, 2003 12:00 pm   Post subject: (No subject)

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




PostPosted: Mon Nov 17, 2003 1:16 pm   Post subject: (No subject)

thanx!!!!!! Smile ...really helped!!!
air_force91




PostPosted: Mon Nov 17, 2003 1:23 pm   Post subject: (No subject)

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




PostPosted: Mon Nov 17, 2003 4:24 pm   Post subject: (No subject)

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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
hackman




PostPosted: Mon Nov 17, 2003 8:13 pm   Post subject: (No subject)

Well heres the scorecard. This is just the...first draft of it. It dosent have all the variables in it.

code:
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




PostPosted: Thu Nov 27, 2003 10:29 pm   Post subject: Re: designing report card

Try this code for your report card! May be it'll help you. :D

Here Is the Code:



report card.t
 Description:

Download
 Filename:  report card.t
 Filesize:  1.01 KB
 Downloaded:  326 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
CjGaughan




PostPosted: Tue Dec 02, 2003 7:25 pm   Post subject: (No subject)

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.



marks.t
 Description:

Download
 Filename:  marks.t
 Filesize:  7.04 KB
 Downloaded:  315 Time(s)

the_short1




PostPosted: Sat Jan 17, 2004 5:54 pm   Post subject: (No subject)

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....Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: