calculate player position based on num cols and rows