|
|
@ -74,6 +74,7 @@ public class SnakeGame extends JFrame { |
|
|
|
public int yCords1 = 0; |
|
|
|
public int yCords2 = 100; |
|
|
|
public int yCords3 = 200; |
|
|
|
public int yCords4 = 300; |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
@ -226,42 +227,42 @@ public class SnakeGame extends JFrame { |
|
|
|
cP.add(panel18); |
|
|
|
|
|
|
|
panel19 = new JPanel(); |
|
|
|
panel19.setBounds(xCords1, 300, 100, 100); |
|
|
|
panel19.setBounds(xCords1, yCords4, 100, 100); |
|
|
|
panel19.setVisible(true); |
|
|
|
panel19.setBackground(Color.BLACK); |
|
|
|
|
|
|
|
cP.add(panel19); |
|
|
|
|
|
|
|
panel20 = new JPanel(); |
|
|
|
panel20.setBounds(xCords2, 300, 100, 100); |
|
|
|
panel20.setBounds(xCords2, yCords4, 100, 100); |
|
|
|
panel20.setVisible(true); |
|
|
|
panel20.setBackground(Color.WHITE); |
|
|
|
|
|
|
|
cP.add(panel20); |
|
|
|
|
|
|
|
panel21 = new JPanel(); |
|
|
|
panel21.setBounds(xCords3, 300, 100, 100); |
|
|
|
panel21.setBounds(xCords3, yCords4, 100, 100); |
|
|
|
panel21.setVisible(true); |
|
|
|
panel21.setBackground(Color.BLACK); |
|
|
|
|
|
|
|
cP.add(panel21); |
|
|
|
|
|
|
|
panel22 = new JPanel(); |
|
|
|
panel22.setBounds(xCords4, 300, 100, 100); |
|
|
|
panel22.setBounds(xCords4, yCords4, 100, 100); |
|
|
|
panel22.setVisible(true); |
|
|
|
panel22.setBackground(Color.BLACK); |
|
|
|
|
|
|
|
cP.add(panel22); |
|
|
|
|
|
|
|
panel23 = new JPanel(); |
|
|
|
panel23.setBounds(xCords5, 300, 100, 100); |
|
|
|
panel23.setBounds(xCords5, yCords4, 100, 100); |
|
|
|
panel23.setVisible(true); |
|
|
|
panel23.setBackground(Color.BLACK); |
|
|
|
|
|
|
|
cP.add(panel23); |
|
|
|
|
|
|
|
panel24 = new JPanel(); |
|
|
|
panel24.setBounds(xCords6, 300, 100, 100); |
|
|
|
panel24.setBounds(xCords6, yCords4, 100, 100); |
|
|
|
panel24.setVisible(true); |
|
|
|
panel24.setBackground(Color.BLACK); |
|
|
|
|
|
|
|