0
I’m doing a project right now and I’m having a problem with an algorithm. Taking into account the 4 directions ( North,East,South,West), if the user chooses one of the 4, should be allocated the next available house with 1 empty house away.
The house with coordinates ( 0,0 ) cannot be occupied. If no one has yet created account the first person to choose one of the directions gets the first home, for example Selects North gets the N1, Selects South gets the S1. The second person to choose North would be with the square with X to the left of the N1.
How could I return the next available coordinate giving as argument the direction ?
No one’s figured it out yet?
– André Castro
better you specify with what you want to create it, because it has PHP tag, Javascrip, Mysql, Sql,....
– aa_sp