function playerNumByRank(rankToSearch)
	local i=0
	for i=1,4 do
		if players[i].rank==rankToSearch then
			return i
		end
	end
	return nil
end

function playerNumByPosition(pos) --right, left, top, bottom
	local i=0
	for i=1,4 do
		if players[i].position==pos then
			return i
		end
	end
end

function cursorIsAvailable()
	return ingameCursor.available
end