Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some changes are made in the Panel and Window size to look Better #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/DataOfSquare.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public class DataOfSquare {
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.BLACK);//0
C.add(Color.GREEN); //1
C.add(Color.YELLOW); //2
color=col;
square = new SquarePanel(C.get(color));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static void main(String[] args) {

//Setting up the window settings
f1.setTitle("Snake");
f1.setSize(300,300);
f1.setSize(100,200);
f1.setVisible(true);
f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Expand Down
4 changes: 2 additions & 2 deletions src/ThreadsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
public class ThreadsController extends Thread {
ArrayList<ArrayList<DataOfSquare>> Squares= new ArrayList<ArrayList<DataOfSquare>>();
Tuple headSnakePos;
int sizeSnake=3;
long speed = 50;
int sizeSnake=2;
long speed = 70;
public static int directionSnake ;

ArrayList<Tuple> positions = new ArrayList<Tuple>();
Expand Down