Computer Science Canada

Help creating "Simon" memory game

Author:  SimonTheMime [ Wed Jan 17, 2007 12:20 pm ]
Post subject:  Help creating "Simon" memory game

If you don't know what it is, click here.

Anyways, I'm really stuck on making Simon.. the main thing I have a problem with is figuring out getting the loop to increase by one each time nd all that stuff.

Does anybody have a sample Simon game or bits of code or any advice so that I could look as as a guideline for making my program.

Thank you very much in advance.

Author:  SimonTheMime [ Thu Jan 18, 2007 8:09 am ]
Post subject:  Re: Help creating "Simon" memory game

Hate to bump but I really need help T_T

Author:  apomb [ Thu Jan 18, 2007 11:08 am ]
Post subject:  Re: Help creating "Simon" memory game

Do you have some code we could maybe see where you might be going wrong?

You mention "getting loops to increment every time"

this can be done with
Turing:
var x : int :=0
loop
    x++
end loop


now whats "all that stuff" you're referring to?

Author:  SimonTheMime [ Thu Jan 18, 2007 12:15 pm ]
Post subject:  Re: Help creating "Simon" memory game

Basically I'm stuck with the whole function of the game... I have the graphics so the machine with the colours.. and the machines light changes according to... shit okay..

I have 20 integers that go random before the loop, from 14, 1 = yellow, 2 = blue, 3 = green, red = 4. And if the first int is 3, then green turns on for example. And I get the loop counter, but I don't understand like getting it to loop what is has so far er.. it's weird. Please help T_T

Author:  apomb [ Thu Jan 18, 2007 1:32 pm ]
Post subject:  Re: Help creating "Simon" memory game

Ok, for anyone else that might want to help, including myself, please post some code. whatever you have. Im assuming youre doing something like
Turing:
var red, blue, green, yellow :int :=0
red := 4
green:=3
blue:=2
yellow:=1

Rand.Int(??) %not too sure what youre randomizing here though

Author:  Clayton [ Thu Jan 18, 2007 4:50 pm ]
Post subject:  Re: Help creating "Simon" memory game

CompWiz333 @ Thu Jan 18, 2007 11:08 am wrote:
Do you have some code we could maybe see where you might be going wrong?

You mention "getting loops to increment every time"

this can be done with
Turing:
var x : int :=0
loop
    x++
end loop


now whats "all that stuff" you're referring to?


that code will not run in Turing CompWiz333 Laughing

Turing doesn't have the increment operator such as that. instead, use a for loop, or a counter within a loop:

Turing:

for i : 1 .. 100
    put i
end for

var i : int := 0

loop
    i += 1
    put i
    exit when i = 100
end loop

Author:  apomb [ Fri Jan 19, 2007 2:52 am ]
Post subject:  Re: Help creating "Simon" memory game

well, i didnt want to GIVE him the code, if he doesnt want to supply any himself Wink shows how much time ive been away from it ...

Author:  SimonTheMime [ Wed Apr 10, 2013 1:42 am ]
Post subject:  RE:Help creating "Simon" memory game

Thanks for the tips guys I was able to finish the program Smile

Author:  Tony [ Wed Apr 10, 2013 2:15 am ]
Post subject:  RE:Help creating "Simon" memory game

OP delivers after 6 years! This thread could be amazing.

Author:  Clayton [ Wed Apr 10, 2013 5:21 am ]
Post subject:  RE:Help creating "Simon" memory game

So... do we get to see the finished product? I'd imagine after 6 years it should have quite some level of quality to it!

Author:  TW iz Rippin [ Thu Apr 11, 2013 12:13 pm ]
Post subject:  RE:Help creating "Simon" memory game

LOL this is great. 6 years into a simon game

Author:  SimonTheMime [ Thu May 15, 2014 1:48 pm ]
Post subject:  RE:Help creating "Simon" memory game

Sorry I don't have a copy of the game anymore.

Thanks for the help though!


: