Author |
Message |
turingnoob
|
Posted: Sat Jan 17, 2009 10:58 pm Post subject: Crazy 8 Help =( |
|
|
HEY GUYZ.....I HAVE THIS ISU DUE IN TOMORROW...CAN ANYONE PLEASE PLZ PLEASE HELP ME OUT...MY MARK IS REALLY LOW AND I DONT WANT TO FAIL...PLZ PLZ PLZ POST THE CODE....I HAVE TO MAKE A CRAZY 8 GAME ON TURING...IT HAS 4 CLASSES...CARD, DECK, HAND, GAME..........I PROMISE TO RETURN UR HELP SOMEHOW...PLZ HELP....PLZ POST CODE.....GOD BLESS
PLZ ADD AND HELP
E-mail removed.@hotmail.com
thanx |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Euphoracle
|
Posted: Sat Jan 17, 2009 11:23 pm Post subject: RE:Crazy 8 Help =( |
|
|
Ahaha
No. Try begging to people in your class in person. They'll care a bit more than we do (we don't care at all). |
|
|
|
|
|
Dan
|
Posted: Sat Jan 17, 2009 11:32 pm Post subject: RE:Crazy 8 Help =( |
|
|
We don't do your home work here for you. It is agisnted the rules of the site and not ethical.
If you want help you are going to have ask spefic questions and the code you have now so we can work with you not do it for you. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
turingnoob
|
Posted: Sun Jan 18, 2009 1:19 pm Post subject: Re: Crazy 8 Help =( |
|
|
Turing: | class Card
var card : int
%===========================returnValue========================
function returnValue : int
result card mod 13 + 1
end returnValue
%============================ReturnSuit========================
function returnSuit : int
result (card mod 4) + 3
end returnSuit
%==========================ReturnCard===========================
function returnCard : int
result card
end returnCard
%==========================SetCard==============================
procedure setCard (intCard : int)
if intCard >= 1 and intCard <= 52 then
card := intCard
end if
end setCard
%============================PointValue=========================
function pointValue : int
var x : int
if returnValue = 12 then
x := 10
elsif returnValue = 11 then
x := 10
elsif returnValue = 13 then
x := 10
elsif returnValue = 1 then
x := 11
else
x := returnValue
end if
result x
end pointValue
%=============================toString=======================
function toString : string
var Suit : char
Suit := chr (returnSuit )
if returnValue = 1 then
result "A " + Suit
elsif returnValue = 11 then
result "J " + Suit
elsif returnValue = 12 then
result "Q " + Suit
elsif returnValue = 13 then
result "K " + Suit
end if
result intstr (pointValue ) + " " + chr (returnSuit )
end toString
end Card
%--------------------------------------------------------------------------------------------
class Deck
var card : array 1 .. 52 of int
var deck : array 1 .. 52 of boolean
var topCard : int
var deckCount := 0
function emptyDeck : boolean
if deckCount = 52 then
result true
else
result false
end if
end emptyDeck
procedure initializeDeck
for i : 0 .. 52
deck (i ) := true
end for
for x : 0 .. 52
card (x ) := shuffleDeck
end for
end initializeDeck
function shuffleDeck : int
var x : int
loop
x := Rand.Int (1, 51)
exit when deck (x )
end loop
deck (x ) := false
result x
end shuffleDeck
end Deck |
Mod Edit: Remember to use syntax tags! Thanks code: | [syntax="turing"]Code Here[/syntax] |
|
|
|
|
|
|
turingnoob
|
Posted: Sun Jan 18, 2009 1:20 pm Post subject: RE:Crazy 8 Help =( |
|
|
datz wat i have...i dunno wat topcard iz...help!!! |
|
|
|
|
|
Euphoracle
|
Posted: Sun Jan 18, 2009 1:43 pm Post subject: RE:Crazy 8 Help =( |
|
|
Why do I severely doubt that you wrote that code? |
|
|
|
|
|
Dan
|
Posted: Sun Jan 18, 2009 1:57 pm Post subject: Re: RE:Crazy 8 Help =( |
|
|
turingnoob @ 18th January 2009, 1:20 pm wrote: datz wat i have...i dunno wat topcard iz...help!!!
How do you not know what topcard is when you made the code? |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Al_
|
Posted: Tue Jan 27, 2009 1:32 pm Post subject: RE:Crazy 8 Help =( |
|
|
You definitely did not make this. stop trying to get others to do your work for you. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
jbking
|
Posted: Tue Jan 27, 2009 5:39 pm Post subject: Re: RE:Crazy 8 Help =( |
|
|
turingnoob @ Sun Jan 18, 2009 11:20 am wrote: datz wat i have...i dunno wat topcard iz...help!!!
Guess what, neither do we since you only declare it and not give a value. Top card should theoretically represent one end of the deck which should be one of the two ends of the array but that is my interpretation of your question. |
|
|
|
|
|
Insectoid
|
Posted: Tue Jan 27, 2009 9:51 pm Post subject: RE:Crazy 8 Help =( |
|
|
Try typing in english as well. It makes you look less like an idiot and we are thus more inclined to help. If that was your code, then you know what you're doing, and don't need our help. |
|
|
|
|
|
saltpro15
|
Posted: Tue Jan 27, 2009 10:02 pm Post subject: RE:Crazy 8 Help =( |
|
|
People like you just fail at life. Voted for banishment from me, we don't do your homework for you |
|
|
|
|
|
|