Removed doxygen author tags, as they we're inaccurate (sed -i '/\s@author.*/d' src/**/*.java)
This commit is contained in:
@@ -13,7 +13,6 @@ import javax.swing.JPanel;
|
|||||||
/**
|
/**
|
||||||
* FieldCanvas class, implements the field to draw upon. Draws the game field and handles mouse actions.
|
* FieldCanvas class, implements the field to draw upon. Draws the game field and handles mouse actions.
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
*/
|
*/
|
||||||
public class FieldCanvas extends JPanel{
|
public class FieldCanvas extends JPanel{
|
||||||
|
|
||||||
@@ -44,7 +43,6 @@ public class FieldCanvas extends JPanel{
|
|||||||
/**
|
/**
|
||||||
* Constructor of FieldCanvas
|
* Constructor of FieldCanvas
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
* @param g
|
* @param g
|
||||||
*/
|
*/
|
||||||
FieldCanvas(Game g){
|
FieldCanvas(Game g){
|
||||||
@@ -126,7 +124,6 @@ public class FieldCanvas extends JPanel{
|
|||||||
/**
|
/**
|
||||||
* Callback if button freeMove gets pressed.
|
* Callback if button freeMove gets pressed.
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
*/
|
*/
|
||||||
public void toggleFreeMove() {
|
public void toggleFreeMove() {
|
||||||
if(freeMoveMode) {
|
if(freeMoveMode) {
|
||||||
@@ -140,7 +137,6 @@ public class FieldCanvas extends JPanel{
|
|||||||
/**
|
/**
|
||||||
* Callback if button undo gets pressed.
|
* Callback if button undo gets pressed.
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
*/
|
*/
|
||||||
public void doUndo() {
|
public void doUndo() {
|
||||||
if(game.getAvailUndo()>0) {
|
if(game.getAvailUndo()>0) {
|
||||||
@@ -152,7 +148,6 @@ public class FieldCanvas extends JPanel{
|
|||||||
/**
|
/**
|
||||||
* Maps a mouse position to game coordinates
|
* Maps a mouse position to game coordinates
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
* @param globalPos Position of clickevent
|
* @param globalPos Position of clickevent
|
||||||
* @return point in game coordinates
|
* @return point in game coordinates
|
||||||
*/
|
*/
|
||||||
@@ -168,7 +163,6 @@ public class FieldCanvas extends JPanel{
|
|||||||
/**
|
/**
|
||||||
* Paint the game field.
|
* Paint the game field.
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
*/
|
*/
|
||||||
public void paintComponent(Graphics g) {
|
public void paintComponent(Graphics g) {
|
||||||
super.paintComponent(g);
|
super.paintComponent(g);
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ public class Game {
|
|||||||
* Interface for Game Update Listeners
|
* Interface for Game Update Listeners
|
||||||
* Listeners who want to receive game updates events (e.g. after the player has done a move)
|
* Listeners who want to receive game updates events (e.g. after the player has done a move)
|
||||||
* should implement this interface and call addUpdateListener on the Game class.
|
* should implement this interface and call addUpdateListener on the Game class.
|
||||||
* @author timo
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface UpdateListener {
|
public interface UpdateListener {
|
||||||
@@ -26,7 +25,6 @@ public class Game {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that stores one specific state of the game and restores it on demand
|
* Class that stores one specific state of the game and restores it on demand
|
||||||
* @author timo
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private class State {
|
private class State {
|
||||||
@@ -94,7 +92,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param size
|
* @param size
|
||||||
*/
|
*/
|
||||||
public Game (int size) {
|
public Game (int size) {
|
||||||
@@ -149,7 +146,6 @@ public class Game {
|
|||||||
* Adds an update listener to the game object.
|
* Adds an update listener to the game object.
|
||||||
* The listener will be called when the game has an update (e.g. the user made a move)
|
* The listener will be called when the game has an update (e.g. the user made a move)
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param listener
|
* @param listener
|
||||||
*/
|
*/
|
||||||
public void addUpdateListener(UpdateListener listener){
|
public void addUpdateListener(UpdateListener listener){
|
||||||
@@ -159,7 +155,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Removes the update listener from the game object.
|
* Removes the update listener from the game object.
|
||||||
* The listener will no longer be called
|
* The listener will no longer be called
|
||||||
* @author aaron
|
|
||||||
* @param listener
|
* @param listener
|
||||||
*/
|
*/
|
||||||
public void removeUpdateListener(UpdateListener listener){
|
public void removeUpdateListener(UpdateListener listener){
|
||||||
@@ -169,7 +164,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Emits the game change event to all registered listeners
|
* Emits the game change event to all registered listeners
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
*/
|
*/
|
||||||
private void emitUpdateEvent(){
|
private void emitUpdateEvent(){
|
||||||
for(UpdateListener e: updateListeners) {
|
for(UpdateListener e: updateListeners) {
|
||||||
@@ -180,7 +174,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Try to move the block from src to dst without crossing any walls
|
* Try to move the block from src to dst without crossing any walls
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param src
|
* @param src
|
||||||
* @param dst
|
* @param dst
|
||||||
* @return True if a move was successful
|
* @return True if a move was successful
|
||||||
@@ -207,7 +200,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Seeks the shortest path between src and dst without crossing any walls
|
* Seeks the shortest path between src and dst without crossing any walls
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param src
|
* @param src
|
||||||
* @param dst
|
* @param dst
|
||||||
* @return Shortest path between src and dst, or null if there is no path
|
* @return Shortest path between src and dst, or null if there is no path
|
||||||
@@ -240,7 +232,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Undo the last move if there are enough available undos.
|
* Undo the last move if there are enough available undos.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @return True if undo was possible.
|
* @return True if undo was possible.
|
||||||
*/
|
*/
|
||||||
public boolean doUndo(){
|
public boolean doUndo(){
|
||||||
@@ -269,7 +260,6 @@ public class Game {
|
|||||||
* Move a block from src to dst and jump over walls.
|
* Move a block from src to dst and jump over walls.
|
||||||
* Only possible if availableFreeMoves()>0
|
* Only possible if availableFreeMoves()>0
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param src
|
* @param src
|
||||||
* @param dst
|
* @param dst
|
||||||
* @return True if freemove was possible.
|
* @return True if freemove was possible.
|
||||||
@@ -299,7 +289,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Reset game score, field and state.
|
* Reset game score, field and state.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
*/
|
*/
|
||||||
public void reset(int size){
|
public void reset(int size){
|
||||||
this.size = size;
|
this.size = size;
|
||||||
@@ -333,7 +322,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Calculates the next game step. This method will either call populateField, or it will cleanup blocks
|
* Calculates the next game step. This method will either call populateField, or it will cleanup blocks
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param lastPoint
|
* @param lastPoint
|
||||||
*/
|
*/
|
||||||
private void nextStep(final Point lastPoint){
|
private void nextStep(final Point lastPoint){
|
||||||
@@ -357,7 +345,6 @@ public class Game {
|
|||||||
* Collision detection and block removal if there are 4 or more blocks in a row in any direction.
|
* Collision detection and block removal if there are 4 or more blocks in a row in any direction.
|
||||||
* Also increases the score if necessary
|
* Also increases the score if necessary
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param lastPoint
|
* @param lastPoint
|
||||||
* @return True if any blocks got removed
|
* @return True if any blocks got removed
|
||||||
*/
|
*/
|
||||||
@@ -450,7 +437,6 @@ public class Game {
|
|||||||
/**
|
/**
|
||||||
* Adds n new blocks to random positions on the field, according to the level number.
|
* Adds n new blocks to random positions on the field, according to the level number.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
*/
|
*/
|
||||||
private void populateField(){
|
private void populateField(){
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import javax.swing.JPanel;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which renders the Blocks that will be placed next on the field
|
* Class which renders the Blocks that will be placed next on the field
|
||||||
* @author timo
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class NextMovesCanvas extends JPanel implements Game.UpdateListener {
|
public class NextMovesCanvas extends JPanel implements Game.UpdateListener {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Class which provides helper to find the shortest path between two points
|
* Class which provides helper to find the shortest path between two points
|
||||||
* Based on pseudo-code from https://de.wikipedia.org/wiki/Dijkstra-Algorithmus#Algorithmus_in_Pseudocode
|
* Based on pseudo-code from https://de.wikipedia.org/wiki/Dijkstra-Algorithmus#Algorithmus_in_Pseudocode
|
||||||
* @author aaron/timo
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class PathFinder {
|
public class PathFinder {
|
||||||
@@ -28,7 +27,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Costructor
|
* Costructor
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param int dist
|
* @param int dist
|
||||||
* @param Point pos
|
* @param Point pos
|
||||||
*/
|
*/
|
||||||
@@ -41,7 +39,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Set the distance
|
* Set the distance
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param int dist
|
* @param int dist
|
||||||
*/
|
*/
|
||||||
public void setDist(int dist){
|
public void setDist(int dist){
|
||||||
@@ -51,7 +48,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Set current position
|
* Set current position
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param Point pos
|
* @param Point pos
|
||||||
*/
|
*/
|
||||||
public void setPos(Point pos){
|
public void setPos(Point pos){
|
||||||
@@ -61,7 +57,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Set previous vertex
|
* Set previous vertex
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param Vertex prev
|
* @param Vertex prev
|
||||||
*/
|
*/
|
||||||
public void setPrev(Vertex prev){
|
public void setPrev(Vertex prev){
|
||||||
@@ -71,7 +66,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Get the distance
|
* Get the distance
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @return int dist
|
* @return int dist
|
||||||
*/
|
*/
|
||||||
public int getDist(){
|
public int getDist(){
|
||||||
@@ -81,7 +75,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Get current position
|
* Get current position
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @return Point pos
|
* @return Point pos
|
||||||
*/
|
*/
|
||||||
public Point getPos(){
|
public Point getPos(){
|
||||||
@@ -91,7 +84,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Get previous vertex
|
* Get previous vertex
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @return Vertex prev
|
* @return Vertex prev
|
||||||
*/
|
*/
|
||||||
public Vertex getPrev(){
|
public Vertex getPrev(){
|
||||||
@@ -173,7 +165,6 @@ public class PathFinder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Seeks the shortest path to dst without crossing any walls
|
* Seeks the shortest path to dst without crossing any walls
|
||||||
* @author aaron
|
|
||||||
* @param dst
|
* @param dst
|
||||||
* @return Shortest path between src and dst, or null if there is no path
|
* @return Shortest path between src and dst, or null if there is no path
|
||||||
*/
|
*/
|
||||||
@@ -241,7 +232,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Finds the nearest vertex to start
|
* Finds the nearest vertex to start
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param vertices
|
* @param vertices
|
||||||
* @return Nearest vertex to the fist element of the given vertices list.
|
* @return Nearest vertex to the fist element of the given vertices list.
|
||||||
*/
|
*/
|
||||||
@@ -261,7 +251,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Helper function for pathfinding. Finds a vertex corresponding to the given coordinate.
|
* Helper function for pathfinding. Finds a vertex corresponding to the given coordinate.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param x
|
* @param x
|
||||||
* @param y
|
* @param y
|
||||||
* @param vertices
|
* @param vertices
|
||||||
@@ -274,7 +263,6 @@ public class PathFinder {
|
|||||||
/**
|
/**
|
||||||
* Helper function for pathfinding. Finds a vertex corresponding to the given point.
|
* Helper function for pathfinding. Finds a vertex corresponding to the given point.
|
||||||
*
|
*
|
||||||
* @author aaron
|
|
||||||
* @param pos
|
* @param pos
|
||||||
* @param vertices
|
* @param vertices
|
||||||
* @return Vertex with the given position out of a list of vertices.
|
* @return Vertex with the given position out of a list of vertices.
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import javax.swing.JPanel;
|
|||||||
/**
|
/**
|
||||||
* Window class, contains the welcome screen and the game itself
|
* Window class, contains the welcome screen and the game itself
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
*/
|
*/
|
||||||
public class Window extends JFrame implements ActionListener, Game.UpdateListener {
|
public class Window extends JFrame implements ActionListener, Game.UpdateListener {
|
||||||
|
|
||||||
@@ -144,7 +143,6 @@ public class Window extends JFrame implements ActionListener, Game.UpdateListen
|
|||||||
* Action listener callback: gets called when a button was pressed
|
* Action listener callback: gets called when a button was pressed
|
||||||
* The method will either start a game or forward an action to the game
|
* The method will either start a game or forward an action to the game
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
* @param e ActionEvent
|
* @param e ActionEvent
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -191,7 +189,6 @@ public class Window extends JFrame implements ActionListener, Game.UpdateListen
|
|||||||
/**
|
/**
|
||||||
* Main method
|
* Main method
|
||||||
*
|
*
|
||||||
* @author timo
|
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user