+ # Total combinations of possible games among n players
+ # nC2 * (n-2)C2 * ... * 2C2 / (n/2)!
+ def total_posibilities(n)
+ n -= 1 if n.odd?
+ return 1 if n <= 2
+
+ ret = 1
+ i = n
+ while i >= 2 do
+ ret *= ::ShogiServer::nCk(i,2)
+ i -= 2
+ end
+ ret /= ::ShogiServer::factorial(n/2)
+ return ret
+ end
+