/** 현재 이 객체가 가지고 있는 테트리스 블록에 대한 형태를 랜덤으로 변경한다. */ public void setRandomShape() { Random r = new Random(); int x = Math.abs(r.nextInt()) % 7 + 1; TetrisBlocks[] values = TetrisBlocks.values(); setShape(values[x]); }