This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by ev on 31-03-2016. | |
*/ | |
public class Maze { | |
private char[][] maze; | |
public Maze() | |
{ | |
maze = new char[][]{{'w', 'w', 'w'}, {'w', 'p', 'w'}, {'w', 'w', 'w'}}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.Set; | |
import java.util.TreeSet; | |
/** | |
* Created by ev on 16-03-2016. | |
*/ | |
public class Graph { | |
Set<Vertice> vertices = new TreeSet<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.TreeSet; | |
/** | |
* Created by ev on 16-03-2016. | |
*/ | |
public class Vertice implements Comparable<Vertice> { | |
private String content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
/** | |
* Created by ev on 16-03-2016. | |
*/ | |
public class Edge { | |
private double cost; | |
private Vertice dest; | |
public double getCost() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
/** | |
* Created by ev on 10-03-2016. | |
*/ | |
public class Student implements Comparable<Student> { | |
public Student(String firstName, String lastName, int age) { | |
this.firstName = firstName; | |
this.lastName = lastName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Collections; | |
public class Main { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.Arrays; | |
/** | |
* Created by ev on 09-03-2016. | |
*/ | |
public class GenericSort<T extends Comparable> { | |
public T[] bubblesort(T[] array) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.ArrayDeque; | |
import java.util.Arrays; | |
public class Main { | |
public static void main(String[] args) { | |
String[] messy = {"Mikkel", "Ebbe", "Liv"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.util.ArrayList; | |
public class Drawing extends JFrame{ | |
private ArrayList<Drawable> drawables = new ArrayList<Drawable>(); | |
public Drawing() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.awt.*; | |
public interface Drawable { | |
void draw(Graphics2D graphics2D) throws InterruptedException; | |
} |