Computer Science Canada Help with ROck paper sicosser game |
Author: | mains50 [ Wed Apr 07, 2010 9:40 pm ] | ||
Post subject: | Help with ROck paper sicosser game | ||
What is it you are trying to achieve? <Replace all the <> with your answers/code and remove the <>> What is the problem you are having? I need help with display High Score with top score name. I have done the whole game program but i have trouble with the coding of high score and top score name. Basically this game is about you have to play the computer when you lose 5 times you exist. Describe what you have tried to solve this problem I have tried different kind of code but all failed Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) the file ics20.t code: % Extra procedures and functions to be used in ICS2O % Programmed by: Ridout % March 2010 %Converts R, P or S to Rock, Paper or Scissors %For example, put RPSFullName('R') will output "Rock" %Param: choice character choice (R, P or S) %Return full name: Rock, Paper or Scissors function RPSFullName (choice : char) : string if choice = 'R' then result "Rock" elsif choice = 'P' then result "Paper" elsif choice = 'S' then result "Scissors" else result "Error" end if end RPSFullName
Please specify what version of Turing you are using 4.1 |
Author: | TerranceN [ Wed Apr 07, 2010 11:41 pm ] |
Post subject: | RE:Help with ROck paper sicosser game |
You need to be more clear with your question. Are you trying to save the top score and name? If so look at The Turing Walkthrough, and look for file input/output. |