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

Username:   Password: 
 RegisterRegister   
 I Need Help On Finnal Assiment Worth Lots Of Marks
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Steven1767




PostPosted: Thu Jun 17, 2010 1:35 pm   Post subject: I Need Help On Finnal Assiment Worth Lots Of Marks

What is it you are trying to achieve?
Help with turing program (cominating program)
and yes i know i cant spell so if i mess up


What is the problem you are having?
im trying to finish this program im making a war card game but for now im useing numbers not cards.
first
i want the draw button to make the numbers to apper under player 1 and computer- they apper now but just as a start the program
second
i want the score to stay at zero untill they click on the draw button and the program figures out which number is bigger and then puts win beside it and adds a point to the score
thirdly
when it is done i want to change it from numbers to actual pictures of cards.


Describe what you have tried to solve this problem
nothing yet im new to the hole turing program and this is for lots of marks


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


</*War Card Game*/
import GUI
var number : string
var numbers := "0"
var number2 : string
var numbers2 := "0"

var winID : int
var exitButton, newGameButton, drawButton : int
winID := Window.Open ("graphics:490, 371  ,title:War")
var orginalNumber : string
var name : string
var computer := "Computer"

put "Please Enter Name"
get name

proc Background
    Pic.ScreenLoad ("Graphics/awesomeBackround3.bmp", 0, 0, picCopy)
    Draw.Text (name, 1 + 35 * index (name, name), 350, Font.New ("Times New Roman:24"), white)
    Draw.Text (computer, 290 + 35 *index (computer,computer), 350, Font.New ("Times New Roman:24"), white)
end Background



proc DrawCard
    var file : int
    open : file, "Number.txt", get
    var numberOfNumbers := 0
    loop
        get : file, skip
        exit when eof (file)
        numberOfNumbers += 1
        get : file, number
        %put number, " ", numberOfNumbers
    end loop
    close : file
    var randomNumber := Rand.Int (1, numberOfNumbers)
    open : file, "Number.txt", get
    for Number : 1 .. randomNumber
        get : file, skip
        exit when eof (file)
        get : file, number
    end for
    close : file
end DrawCard

proc ComputerDrawCard
    var file : int
    open : file, "Number.txt", get
    var numberOfNumbers := 0
    loop
        get : file, skip
        exit when eof (file)
        numberOfNumbers += 1
        get : file, number2
        %put number, " ", numberOfNumbers
    end loop
    close : file
    var randomNumber := Rand.Int (1, numberOfNumbers)
    open : file, "Number.txt", get
    for Number2 : 1 .. randomNumber
        get : file, skip
        exit when eof (file)
        get : file, number2
    end for
    close : file
end ComputerDrawCard

proc Score
    var file : int
    open : file, "Score.txt", get
    var numberOfNumbers := 0
    loop
        get : file, skip
        exit when eof (file)
        numberOfNumbers += 1
        get : file, number
        %put number, " ", numberOfNumbers
    end loop
    close : file
    var randomNumber := Rand.Int (1, numberOfNumbers)
    open : file, "Score.txt", get
    for Number : 1 .. randomNumber
        get : file, skip
        exit when eof (file)
        get : file, number
    end for
    close : file
end Score

proc ComputerScore
    var file : int
    open : file, "Score.txt", get
    var numberOfNumbers := 0
    loop
        get : file, skip
        exit when eof (file)
        numberOfNumbers += 1
        get : file, number2
        %put number, " ", numberOfNumbers
    end loop
    close : file
    var randomNumber := Rand.Int (1, numberOfNumbers)
    open : file, "Score.txt", get
    for Number2 : 1 .. randomNumber
        get : file, skip
        exit when eof (file)
        get : file, number2
    end for
    close : file
end ComputerScore

proc PlaceNumber
    Draw.Text (number, 60 + 35 * index (numbers, number), 300, Font.New ("arial:16"), blue)
end PlaceNumber

proc PlaceComputersNumber
    Draw.Text (number2, 380 + 35 * index (numbers2, number2), 300, Font.New ("arial:16"), green)
end PlaceComputersNumber

proc PlaceScore
    Draw.Text (number, 60 + 35 * index (numbers, number), 150, Font.New ("arial:16"), green)
end PlaceScore

proc PlaceComputerScore
    Draw.Text (number, 380 + 35 * index (numbers, number), 150, Font.New ("arial:16"), blue)     
end PlaceComputerScore

proc NewGame
    Draw.Cls %Remove Screen
    Background
    GUI.Refresh
    %pick a new Number
    DrawCard
    ComputerDrawCard
    GUI.Enable (newGameButton)
end NewGame

proc exitGameButton
    Draw.Cls
    GUI.Refresh
    DrawCard
    GUI.Disable (exitButton)
end exitGameButton

proc DisableButtons
    GUI.Disable (newGameButton)
end DisableButtons

proc buttons
    newGameButton := GUI.CreateButton (80, 3, 0, "New", NewGame)
    GUI.Enable (newGameButton)
    exitButton := GUI.CreateButton (10, 3, 0, "Quit", GUI.Quit)
    drawButton := GUI.CreateButton (220, 190, 0, "Draw", DrawCard)
end buttons

proc WinGame
    put "You Win"
    %Pic.ScreenLoad ("Graphcis/", 0, 0, picCopy)
    GUI.Enable (newGameButton)
end WinGame

proc MainProgram
    loop
        exit when GUI.ProcessEvent
    end loop
end MainProgram


Background
DrawCard
ComputerDrawCard
Score
ComputerScore
PlaceNumber
PlaceComputersNumber
PlaceScore
PlaceComputerScore
buttons
MainProgram
>



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
Unnamed.t




PostPosted: Fri Jun 18, 2010 12:18 pm   Post subject: Re: I Need Help On Finnal Assiment Worth Lots Of Marks

Sorry I can't give you much help with your code. This is because you are using FILE I/O and I do not have the specific text file or picture file you are using. Apparently there isn't any direct error with your code. Please upload the text and picture file so I can check for logic errors.
Cezna




PostPosted: Fri Jun 18, 2010 2:45 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

I don't get why everyone waits 'till the last few days of school to do these things...
USEC_OFFICER




PostPosted: Fri Jun 18, 2010 2:49 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Because they realize that they are running out of time?
Cezna




PostPosted: Fri Jun 18, 2010 2:52 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Maybe, but I mean, how do they not have more done already?

Most of the time these type of assignments are given at least two weeks before the end of the year (at least in my experience).

This year I got my culminating assignment like 3 weeks ago, and I have been done for 2 of them.

But then again, if any of these kids are anything like those in my class, they probably are so busy watching FIFA in class that they forget to do their work until the 11th hour.
TokenHerbz




PostPosted: Sun Jun 20, 2010 3:41 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Fail...
A.J




PostPosted: Sun Jun 20, 2010 3:56 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Ok, I am getting kind of tired of this ..

If you expect us to solve the problem for you after merely stating them and then saying "I don't know what to do, I am new to Turing", obviously you either got this program from a friend and just want us to modify it for you, or you actually did program this and somehow couldn't bother to even try figuring out the problem for yourself.

Sorry if I come across as rude, but please attempt solving these issues yourself before seeking help.

Also, the '<' and '>' before and after your code suggest that you did indeed copy it from somewhere...though here I could be wrong.
Cezna




PostPosted: Sun Jun 20, 2010 7:06 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Don;t worry AJ, you didn't come across as rude, only realistically skeptical.

I too, am quickly becoming tired of all these 11th hour ISPs in the help section.

Not to mention the fact that this guy has only one post...
Sponsor
Sponsor
Sponsor
sponsor
Monduman11




PostPosted: Sun Jun 20, 2010 7:11 pm   Post subject: Re: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Cezna @ Sun Jun 20, 2010 7:06 pm wrote:
Don;t worry AJ, you didn't come across as rude, only realistically skeptical.

I too, am quickly becoming tired of all these 11th hour ISPs in the help section.

Not to mention the fact that this guy has only one post...

what is actually kind of annoying is that some people come on here, ask for help and leave once they get it and never come back. honestly the least they can do is at least say thank you. and yea there were people in my class who still had loads to do on their programs and they were due in 2 days... people just procrastinate way to much.. including myself lol, but at least i was done on time
Cezna




PostPosted: Sun Jun 20, 2010 7:14 pm   Post subject: Re: I Need Help On Finnal Assiment Worth Lots Of Marks

Steven1767 @ Thu Jun 17, 2010 1:35 pm wrote:
nothing yet im new to the hole turing program and this is for lots of marks

If this is your culminating activity, then you just took a whole course on Turing, so how can you say you are new to it?
Confused

Also, no one cares if it is worth lots of marks.
In fact, if it is worth lots of marks, that's all the more reason we shouldn't do it for you, since such a big chunk of your grade should be coming from your own work.
Monduman11




PostPosted: Sun Jun 20, 2010 7:18 pm   Post subject: Re: I Need Help On Finnal Assiment Worth Lots Of Marks

Cezna @ Sun Jun 20, 2010 7:14 pm wrote:
Steven1767 @ Thu Jun 17, 2010 1:35 pm wrote:
nothing yet im new to the hole turing program and this is for lots of marks

If this is your culminating activity, then you just took a whole course on Turing, so how can you say you are new to it?
Confused

Also, no one cares if it is worth lots of marks.
In fact, if it is worth lots of marks, that's all the more reason we shouldn't do it for you, since such a big chunk of your grade should be coming from your own work.

lol ,so yea he either is way to lazy to do it himself, or the more likely option he copied it from someone and has no clue how to fix it or add to it
Cezna




PostPosted: Sun Jun 20, 2010 7:48 pm   Post subject: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

This happens all too often....
jcollins1991




PostPosted: Sun Jun 20, 2010 8:08 pm   Post subject: Re: I Need Help On Finnal Assiment Worth Lots Of Marks

Was that entire conversation really necessary? When someone has a problem and doesn't properly ask for help it only takes one person to say no and explain why. You don't need a million people uselessly saying no and then starting conversations as I've seen in a few threads lately. If you want to complain about these last minute beggars, couldn't you at least make a new thread in Off Topic or something?
Cezna




PostPosted: Sun Jun 20, 2010 8:44 pm   Post subject: Re: I Need Help On Finnal Assiment Worth Lots Of Marks

jcollins1991 @ Sun Jun 20, 2010 8:08 pm wrote:
Was that entire conversation really necessary? When someone has a problem and doesn't properly ask for help it only takes one person to say no and explain why. You don't need a million people uselessly saying no and then starting conversations as I've seen in a few threads lately. If you want to complain about these last minute beggars, couldn't you at least make a new thread in Off Topic or something?


Everyone just likes a chance to be social and feel like they have accomplished something, this sort of social interaction is above an beyond what many computer programmers such as myself are used too).
And starting a new topic would be too blatant an admission of that for anyone's comfort

** DISCLAIMER **
(if anyone was offended by that, I was jk, and : BooHoo , partly because you truly do deserve that, and partly because I have always wanted to use that smiley)
Srlancelot39




PostPosted: Tue Sep 28, 2010 6:39 pm   Post subject: Re: RE:I Need Help On Finnal Assiment Worth Lots Of Marks

Cezna @ Fri Jun 18, 2010 2:52 pm wrote:
Maybe, but I mean, how do they not have more done already?

Most of the time these type of assignments are given at least two weeks before the end of the year (at least in my experience).

This year I got my culminating assignment like 3 weeks ago, and I have been done for 2 of them.

But then again, if any of these kids are anything like those in my class, they probably are so busy watching FIFA in class that they forget to do their work until the 11th hour.


My grade 12 final project was given on the first day of school =\.
My project was Grail Quest...download it!!!! look below!
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 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: