feat: day 1 progress

This commit is contained in:
Martin Prokoph
2025-06-27 19:58:59 +02:00
commit 9e45ea3f37
29 changed files with 988 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
package eu.midnightdust.yaytris.game;
import java.awt.Color;
public enum TetrominoShape {
SQUARE(new int[][]{
{1, 1},
{1, 2}
}, Color.YELLOW),
LINE(new int[][]{
{1},
{2},
{1},
{1}
}, Color.BLUE),
T(new int[][]{
{0, 1, 0},
{1, 2, 1}
}, Color.RED),
L_LEFT(new int[][]{
{0, 1},
{0, 2},
{1, 1}
}, Color.MAGENTA),
L_RIGHT(new int[][]{
{1, 0},
{2, 0},
{1, 1}
}, Color.GREEN),
ZAP_LEFT(new int[][]{
{0, 1},
{1, 2},
{1, 0}
}, Color.CYAN),
ZAP_RIGHT(new int[][]{
{1, 0},
{2, 1},
{0, 1}
}, Color.PINK);
;
final int[][] boundary;
final Color color;
TetrominoShape(int[][] boundary, Color color) {
this.boundary = boundary;
this.color = color;
}
}