summaryrefslogtreecommitdiff
path: root/math/nimm.cpp
diff options
context:
space:
mode:
authorPaul Jungeblut <s_jungeb@i08pc54.atis-stud.uni-karlsruhe.de>2014-11-25 16:18:37 +0100
committerPaul Jungeblut <s_jungeb@i08pc54.atis-stud.uni-karlsruhe.de>2014-11-25 16:18:37 +0100
commit741a7bcb9ed0fa5175adbb3bf98f53e31b27c09c (patch)
treeb5a56978b66e60cf14466a5141e58fc3b7fb0fb2 /math/nimm.cpp
parent32a21e6524d1feb9c6442bf53f19bc14e87f1735 (diff)
parent0ad526363ba0a83b0711ba232153f5be044ce8e5 (diff)
Merge branch 'master' of https://github.com/pjungeblut/ChaosKITs
merg# Bitte geben Sie eine Commit-Beschreibung ein um zu erklären, warum dieser
Diffstat (limited to 'math/nimm.cpp')
-rw-r--r--math/nimm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/math/nimm.cpp b/math/nimm.cpp
new file mode 100644
index 0000000..3da6ca1
--- /dev/null
+++ b/math/nimm.cpp
@@ -0,0 +1,6 @@
+#Most important function!!
+bool WinNimm(vector<int> game) {
+ int result = 0;
+ for(int s: game) result ^= s;
+ return s > 0;
+}