package control;

import java.awt.*;
import java.util.*;

import javax.swing.*;

import control.samples.*;
import model.*;
import view.*;

/**
 * Test class.
 * @author cryingshadow
 */
public class Main {

    /**
     * @param args Ignored.
     */
    public static void main(final String[] args) {
        final JFrame frame = new JFrame("SnakeTest");
        final Container content = frame.getContentPane();
        final CompetitionControl control =
            new CompetitionControl(
                new GlobalSettings(),
                Arrays.asList(new RandomSnakeControl())
            );
        final Maze maze =
            new Maze(
                new Field[][]{
                    {
                        new Field(FieldType.FREE, Optional.empty()),
                        new Field(FieldType.WALL, Optional.empty()),
                        new Field(FieldType.FOOD, Optional.empty())
                    },
                    {
                        new Field(FieldType.SNAKE, Optional.of(new SnakePart(Color.RED, false))),
                        new Field(FieldType.SNAKE, Optional.of(new SnakePart(Color.GREEN, true))),
                        new Field(FieldType.COLLISION, Optional.empty())
                    }
                }
            );
        content.add(
            new MazeDisplay(
//                maze,
                control.getCurrentMaze(),
                50
            )
        );
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }

}

@@ -587,32 +587,34 @@
 %0A            );%0A
+//
         final Ma
@@ -623,16 +623,18 @@
  maze =%0A
+//
         
@@ -647,16 +647,18 @@
 w Maze(%0A
+//
         
@@ -680,16 +680,18 @@
 ld%5B%5D%5B%5D%7B%0A
+//
         
@@ -696,32 +696,34 @@
               %7B%0A
+//
                 
@@ -767,32 +767,34 @@
 ional.empty()),%0A
+//
                 
@@ -842,24 +842,26 @@
 l.empty()),%0A
+//
             
@@ -908,32 +908,34 @@
 tional.empty())%0A
+//
                 
@@ -941,16 +941,18 @@
      %7D,%0A
+//
         
@@ -965,16 +965,18 @@
       %7B%0A
+//
         
@@ -1061,24 +1061,26 @@
 , false))),%0A
+//
             
@@ -1166,16 +1166,18 @@
 rue))),%0A
+//
         
@@ -1237,24 +1237,26 @@
 al.empty())%0A
+//
             
@@ -1257,32 +1257,34 @@
               %7D%0A
+//
                 
@@ -1285,16 +1285,18 @@
       %7D%0A
+//
         

comment out