GameServer单例用于它的位置数组,其中保存了游戏面板上每个格子的当前状态。
The GameServer singleton is used for its positions array, which has the current state of each square on the game board.
受控制的进程的优先级是由进程在数组中的位置索引决定的。
The priority of a controlled process is determined by its position index in the array.
地址是它在权重数组中的位置。
But if, at any point, I get to a place in the list where the thing I'm looking for is smaller than the element in the list, I know everything else in the rest of the list has to be bigger than that, I don't have to bother looking anymore.
比当前位置数组的元素要小,我也就知道后面的数肯定,也都比我的目标数要大了,我就不用再继续进行下去了,这意味着目标数不在这个数组中,我就可以退出了。
If it's there, I'm done, if not, I keep walking down, and I only stop when I get to a place where the element I'm looking for is smaller than the value in the list., in which case I know the rest of this is too big and I can stop.
并且保持遍历,我只在当当前位置的数组元素,大于目标数时停止,这意味着剩下的元素都比目标元素大,但是其他的情况,我还是要遍历完整个数组。
应用推荐