Commits

yoshihiro503  committed bb0b0d3

pieces

  • Participants
  • Parent commits 9142cb2

Comments (0)

Files changed (1)

 
 let list = 1--21
 let of_id = function
+  | 1 -> [(0,0)]
+  | 2 -> [(0,0);(0,1)]
  | 3 -> [(0,0); (0,-1); (1,-1)]
+ | 4 -> [(0,0);(1,0);(2,0)]
+ | 5 -> [(0,0);(1,0);(2,0);(3,0)]
+ | 6 -> [(0,0);(0,-1);(1,-1);(1,-2)]
+ | 7 -> [(0,0);(1,0);(1,1);(1,-1)]
+ | 8 -> [(0,0);(1,0);(2,0);(0,1)]
+ | 9 -> [(0,0);(1,0);(0,1);(1,1)]
+ |10 -> [(0,0);(1,0);(2,0);(0,1);(2,1)]
+ |11 -> [(0,0);(0,-1);(1,-1);(2,-1);(2,-2)]
+ |12 -> [(0,0);(1,0);(2,0);(1,1);(1,-1)]
+ |13 -> [(0,0);(-1,0);(-2,0);(-2,1);(-2,-1)]
+ |14 -> [(0,0);(0,-1);(0,-2);(1,-1);(1,-2)]
+ |15 -> [(0,0);(1,0);(2,0);(3,0);(3,1)]
+ |16 -> [(0,0);(1,0);(2,0);(3,0);(4,0)]
+ |17 -> [(0,0);(1,0);(2,0);(3,0);(2,1)]
+ |18 -> [(0,0);(1,0);(1,-1);(2,-1);(2,-2)]
+ |19 -> [(0,0);(0,1);(-1,1);(-1,2);(-2,1)]
+ |20 -> [(0,0);(0,1);(0,2);(-1,2);(-1,3)]
+ |21 -> [(0,0);(1,0);(2,0);(0,1);(0,2)]
+
  | id -> failwith (!%"not supported piece: %d" id)
 
 let rotate n piece =