Find the last column played.

I have a game which uses an array, but I am not sure how to tell what the last spot in the array was played. Any ideas on how to do this?
[144 byte] By [jfromera] at [2007-10-3 3:53:18]
# 1

hello,

create a variable lastSpot(String, int, boolean, ... ?).

when you first play a spot, lastSpot is null.

create a method that initialize lastSpot with current spot before playing the next or the other spot.

after, when you will want to retrieve the last spot played, you will check your variable lastSpot...

fred

suparenoa at 2007-7-14 21:51:07 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
I know that I will have to use that method, but I'm not sure how to initialize it with the last spot chosen.
jfromera at 2007-7-14 21:51:07 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
when you choose to play another spot, before playing it, you initialise lastSpot with the current spot and after you display the choosen spot. so lastSpot is the spot played before the new onewhen you wanna play the last spot played, it will be lastSpot.
suparenoa at 2007-7-14 21:51:07 > top of Java-index,Java Mobility Forums,Java ME Technologies...