
package com.lofibucket.yotris.logic;

import java.util.ArrayList;
import java.util.Map;
import java.util.Random;

public class TetriminoShape {
	private Map<String, boolean[][]> shapes;

	private static final boolean[][] O = 
			new boolean[][] 
			{
			{false, true, 	true, false},
			{false, true, 	true, false},
			{false, false, 	false, false},
			{false, false, 	false, false}
			};

	private static final boolean[][] I = 
			new boolean[][] 
			{
			{false, true, 	false, false},
			{false, true, 	false, false},
			{false, true, 	false, false},
			{false, true, 	false, false}
			};

	public static boolean[][] getShape(String shape) {
		switch (shape) {
			case "O":
				return O;
			case "I":
				return I;
			default:
				// TODO throw a proper error here
				System.out.println("Error: invalid shape ID for getTetrimino.");
				return O;
		}
	}

	public static boolean[][] getRandomShape() {
		ArrayList<boolean[][]> shapes = new ArrayList<>();
		Random random = new Random();

		shapes.add(O);
		shapes.add(I);

		return shapes.get(random.nextInt(shapes.size()));
	}
}

@@ -245,31 +245,24 @@
 %5D %0A%09%09%09%7B%0A%09%09%09%7B
-false, 
 true, %09true,
@@ -264,116 +264,28 @@
 true
-, false%7D,%0A%09%09%09%7Bfalse, true, %09true, false%7D,%0A%09%09%09%7Bfalse, false, %09false, false%7D,%0A%09%09%09%7Bfalse, false, %09false, false%7D
+%7D,%0A%09%09%09%7Btrue, %09true%7D,
 %0A%09%09%09

make O shape smaller