Re: [stella] Master Mind deluxe - key theory

Subject: Re: [stella] Master Mind deluxe - key theory
From: "Erik Mooney" <erik@xxxxxxxxxx>
Date: Tue, 6 Apr 2004 16:37:32 -0500
Happy_Dude <happy_dude@xxxxxxxxxxxxx> wrote:

> Not sure. It doesn't look like i to N would encompass the whole array
> 
> Time for a visual aide:
> 
> 01234 - Array position
> 34012 - The order j needs to move in. 0 = i
> 
> So at array position 0 or 4, j would need to roll over to 4 or 0 respectivly.
> And the loop would exit once it reached i. (in my case IF it reached i ;-) )

Easy.

ldy i
Loop
;do your thing
iny
cpy #5
bne NoRoll
ldy #0
NoRoll
cpy i
bne Loop

Hope that helps - if you don't follow the logic, let me know.
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread