Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

duh, (0,3,6 X+ ^3) is just ^9

  • Loading branch information...
commit 5b498b491a1296854822aec9a9a06660f247c839 1 parent 8fafd24
@philandstuff philandstuff authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 games/tictactoe.p6
View
15 games/tictactoe.p6
@@ -48,3 +48,18 @@ sub tictactoe-moritz (*@b) {
tictactoe-moritz( 1, 1, 1,
0,-1,-1,
-1,-1, 0);
+
+sub tictactoe-rhebus2 (*@b) {
+ my @lines = ^9,(^3 X+ 0,3,6),8,4,(^4 Z+ ^4);
+ say ~@lines;
+ for @lines -> $a, $b, $c {
+ if @b[$a] && [==] @b[$a,$b,$c] {
+ say "@b[$a] won"
+ }
+ }
+}
+
+tictactoe-rhebus2( 1, 1, 1,
+ 0,-1,-1,
+ -1,-1, 0);
+
Please sign in to comment.
Something went wrong with that request. Please try again.