I'm to do the design for the Tetris game for a project for a class.
(我要为一个班级的项目做俄罗斯方块游戏的设计。)
Using SceneBuilder to create the layout. (使用SceneBuilder创建布局。)
From my understanding and the code my partner provided me with is (从我的理解和我的伴侣提供给我的代码是)
create a bunch of graphical blocks that I can set to visible whenever spaces shows a spot as true and set to invisible whenever a spot shows as false
(创建一堆图形块,每当空格显示一个点为true时,我就可以将它们设置为可见;当一个点显示为false时,我可以将其设置为不可见。)
The way that I have gone about it is I created a Grid Panel inside a Pane, a 10x20 one more specifically.
(我采用的方法是在窗格内创建一个网格面板,更具体地说是10x20。)
Should that work?
(应该行吗?)
would say a T Block be able to to work under those conditions? (会说T座能够在这些条件下工作吗?)
For reference on how he going about the "Spaces" to where the Blocks are to be placed is this
(供参考,以了解他如何将“空间”放置到放置块的位置)
//Length and width will always be 20 and 10 respectively
private int length = 20;
private int width = 10;
//Spaces represents each individual block of the board, which is either full or empty
private boolean[][]spaces = new boolean[length][width];
public Board()
{
//Set each space to false, as at the beginning the board is empty.
for(int x= 0; x < length; x++)
for(int y = 0; y < length; y++)
spaces[x][y] = false;
}
ask by Role Chapa translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…