Game ranking calculation problem