diff --git a/src/DataOfSquare.java b/src/DataOfSquare.java index f1ec760..27809dc 100644 --- a/src/DataOfSquare.java +++ b/src/DataOfSquare.java @@ -12,8 +12,8 @@ public DataOfSquare(int col){ //Lets add the color to the arrayList C.add(Color.darkGray);//0 - C.add(Color.BLUE); //1 - C.add(Color.white); //2 + C.add(Color.RED); //1 + C.add(Color.yellow); //2 color=col; square = new SquarePanel(C.get(color)); } diff --git a/src/ThreadsController.java b/src/ThreadsController.java index 3df2d3d..fa0f69b 100644 --- a/src/ThreadsController.java +++ b/src/ThreadsController.java @@ -1,12 +1,14 @@ import java.util.ArrayList; - +import java.util.Scanner; //Controls all the game logic .. most important class in this project. public class ThreadsController extends Thread { ArrayList> Squares= new ArrayList>(); Tuple headSnakePos; - int sizeSnake=3; - long speed = 50; + Scanner sc = new Scanner(System.in); + System.out.println("Enter the size of snake"); + int sizeSnake=sc.nextInt; + long speed = 40; public static int directionSnake ; ArrayList positions = new ArrayList();