.
This commit is contained in:
20
DEV3.2/TP05/04_Serpent/Fenetre.java
Normal file
20
DEV3.2/TP05/04_Serpent/Fenetre.java
Normal file
@@ -0,0 +1,20 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayDeque;
|
||||
|
||||
public class Fenetre extends JFrame {
|
||||
|
||||
public Fenetre() {
|
||||
this.setSize(500, 500);
|
||||
this.setLocation(100, 100);
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
this.setLayout(new GridLayout(1, 1));
|
||||
ArrayDeque<Point> coordSnake = new ArrayDeque<>();
|
||||
for (int i = 0; i != 5; i++) {
|
||||
coordSnake.addLast(new Point(i+5, 5));
|
||||
}
|
||||
this.add(new JGrilleDeJeu(coordSnake));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user