repl.it
Java

No description

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Tetris {  
  public static void main(String[] args) {    
    StdDraw.setScale(-1,21);
    int[][] board = new int[20][10];
    StdDraw.setPenRadius(0.005);
    StdDraw.setPenColor(StdDraw.BLACK);
    StdDraw.filledSquare(10,10,11);
    StdDraw.setPenColor(StdDraw.GRAY);
    for(int i = 0; i < 11; i++) {
      StdDraw.line(i+5,0,i+5,20);
    }
    for(int i = 0; i < 21; i++) {
      StdDraw.line(5,i,15,i);
    }
    int score = 0;
    int level = 0;
    int activePiece = 7*Math.Random();
    int nextPiece = 7*Math.Random();
// 0 = t, 1 = j, 2 = z, 3 = o, 4 = s, 5 = l, 6 = i
    while(true) {
      
    }
  }
}
Fetching token
?