Go Fish: Difference between revisions
Content added Content deleted
Line 246: | Line 246: | ||
=={{header|FutureBasic}}== |
=={{header|FutureBasic}}== |
||
<syntaxhighlight lang="futurebasic"> |
<syntaxhighlight lang="futurebasic"> |
||
/* |
/* |
||
Line 403: | Line 404: | ||
End fn |
End fn |
||
local fn CheckCPUForCompletedBook |
local fn CheckCPUForCompletedBook as boolean |
||
bool Completed = _false |
|||
For i = 1 To 13 |
For i = 1 To 13 |
||
Line 420: | Line 422: | ||
Print "CPU completed the book of " + WantsCard + "'s." |
Print "CPU completed the book of " + WantsCard + "'s." |
||
Completed = _true |
|||
text ,,fn colorWhite |
text ,,fn colorWhite |
||
Computer(i) = 0 |
Computer(i) = 0 |
||
Line 428: | Line 430: | ||
Next i |
Next i |
||
End fn |
End fn = Completed |
||
local fn QuitOrPlayAlert(GameResult as CFStringRef) |
local fn QuitOrPlayAlert(GameResult as CFStringRef) |
||
Line 668: | Line 670: | ||
if RequestedCard = "X" or RequestedCard = "x" then fn QuitOrResumeAlert(@"EXIT") |
if RequestedCard = "X" or RequestedCard = "x" then fn QuitOrResumeAlert(@"EXIT") |
||
CardNumber = 0 |
|||
If RequestedCard <> "" Then CardNumber = Instr$(1,cards, Ucase$(RequestedCard)): RequestCard = _true |
If RequestedCard <> "" Then CardNumber = Instr$(1,cards, Ucase$(RequestedCard)): RequestCard = _true |
||
Line 767: | Line 769: | ||
text ,,fn colorRed: Print "go fish!" |
text ,,fn colorRed: Print "go fish!" |
||
text ,,fn colorWhite:Print Someone + " got";: fn cpuGoFishing |
text ,,fn colorWhite:Print Someone + " got";: fn cpuGoFishing |
||
fn CheckCPUForCompletedBook |
|||
CPUsTurn = _true |
if fn CheckCPUForCompletedBook then CPUsTurn = _false else CPUsTurn = _true |
||
Else |
Else |