EchoFool Posted October 15, 2010 Share Posted October 15, 2010 Im really stuck here. I have an array that stores a number of seats from 1 to 8 that are currently booked at a table that is circular. So im trying to make a function to return the next "taken" seat at this round table to the "left" of where your sitting. How ever the problem i face is when you reach checking seat 8 you need to go to seat 1 as that would be "left" of seat 8. From the array below if i was sat at seat 7 i would need it to then check 8 and then back to one as this would technically be "left" of seat 8 at a round table. Here is an array example of seats that are already taken: [0] = 2 [1] = 3 [2] = 5 [3] = 7 How on earth do i do it - i can't even think of the logic on this one :S Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.