<commit_before>package pl.edu.agh.two.gui.views;

import java.awt.Color;
import java.awt.Component;

import javax.swing.JPanel;
import javax.swing.border.MatteBorder;

import net.miginfocom.swing.MigLayout;
import pl.edu.agh.two.domain.map.Map;
import pl.edu.agh.two.domain.rooms.Coordinates;
import pl.edu.agh.two.domain.rooms.IRoom;
import pl.edu.agh.two.domain.rooms.Wall;

/**
 * @author <NAME>
 * @since 17 lis 2015
 */
@SuppressWarnings("serial")
public class MapPanel extends JPanel {
	private JPanel mapPanel;

	private int cellSize = 20;

	public MapPanel() {
		mockMap();
	}

	public void mockMap() {
		mapPanel = new JPanel();
		mapPanel.setLayout(new MigLayout("", "", ""));
		mapPanel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

		for (int column = 0; column < 10; column++) {
			for (int row = 0; row < 10; row++) {
				if (row == 5 && column == 3) {
					setPlayer(column, row);
				} else if (row % 5 == 0) {
					setEmpty(column, row);
				} else if (column % 2 == 0) {
					setWall(column, row);
				} else {
					setEmpty(column, row);
				}
			}
		}
		add(mapPanel);
	}

	public void paint(Map map) {
		mapPanel = new JPanel();
		mapPanel.setLayout(new MigLayout("", "", ""));
		mapPanel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));
		Coordinates currentCoords = map.getCurrentRoom().getCoordinates();
		for (IRoom[] rooms : map.getMap()) {
			for (IRoom room : rooms) {
				if (!currentCoords.equals(room.getCoordinates())) {
					addRoomToMap(room);
				}
			}
		}

		add(mapPanel);

	}

	private void addRoomToMap(IRoom room) {
		
		Coordinates coords = room.getCoordinates();
		if(room instanceof Wall){
			setWall(coords.getX(), coords.getY());
		} else if (room instanceof )
	}

	private void addMapCell(Component component, int column, int row) {
		mapPanel.add(component, "cell " + column + " " + row + ", width :" + cellSize + ":, height :" + cellSize + ":");
	}

	private JPanel getWallPanel() {
		JPanel panel = new JPanel();<commit_msg>GUI-map-v2 add rooms<commit_after>package pl.edu.agh.two.gui.views;

import java.awt.Color;
import java.awt.Component;

import javax.swing.JPanel;
import javax.swing.border.MatteBorder;

import net.miginfocom.swing.MigLayout;
import pl.edu.agh.two.domain.map.Map;
import pl.edu.agh.two.domain.rooms.Coordinates;
import pl.edu.agh.two.domain.rooms.EmptyRoom;
import pl.edu.agh.two.domain.rooms.IRoom;
import pl.edu.agh.two.domain.rooms.Wall;

/**
 * @author <NAME>
 * @since 17 lis 2015
 */
@SuppressWarnings("serial")
public class MapPanel extends JPanel {
	private JPanel mapPanel;

	private int cellSize = 20;

	public MapPanel() {
		mockMap();
	}

	public void mockMap() {
		mapPanel = new JPanel();
		mapPanel.setLayout(new MigLayout("", "", ""));
		mapPanel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

		for (int column = 0; column < 10; column++) {
			for (int row = 0; row < 10; row++) {
				if (row == 5 && column == 3) {
					setPlayer(column, row);
				} else if (row % 5 == 0) {
					setEmpty(column, row);
				} else if (column % 2 == 0) {
					setWall(column, row);
				} else {
					setEmpty(column, row);
				}
			}
		}
		add(mapPanel);
	}

	public void paint(Map map) {
		mapPanel = new JPanel();
		mapPanel.setLayout(new MigLayout("", "", ""));
		mapPanel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

		Coordinates currentCoords = map.getCurrentRoom().getCoordinates();
		for (IRoom[] rooms : map.getMap()) {
			for (IRoom room : rooms) {
				if (!currentCoords.equals(room.getCoordinates())) {
					addRoomToMap(room);
				}
			}
		}

		add(mapPanel);

	}

	private void addRoomToMap(IRoom room) {

		Coordinates coords = room.getCoordinates();
		if (room instanceof Wall) {
			setWall(coords.getX(), coords.getY());
		} else if (room instanceof EmptyRoom) {
			setEmpty(coords.getX(), coords.getY());

		}
	}

	private void addMapCell(Component component, int column, int row) {
		mapPanel.add(component, "cell " + column + " " + row + ", width :" + cellSize + ":, height :" + cellSize + ":");
	}

	private JPanel getWallPanel() {
		JPanel panel = new JPanel();
{'fraction_non_alphanumeric': 0.1638118214716526, 'fraction_numerical': 0.016646562123039808, 'mean_word_length': 3.566079295154185, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1785990', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1466, 'n_words': 351}