-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from UnGuZartex/Tests
Tests
- Loading branch information
Showing
26 changed files
with
1,480 additions
and
91 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUICavityBlock; | ||
|
||
/** | ||
* A factory to create if GUI blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class IfGUIFactory extends GUIFactory { | ||
private String name = "If"; | ||
|
||
/** | ||
* Variable referring to the name of an if block. | ||
*/ | ||
private static final String name = "If"; | ||
|
||
/** | ||
* Create a new if block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new cavity block block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
return new GUICavityBlock(name, id, x,y); | ||
public GUICavityBlock createBlock(String id, int x, int y) { | ||
return new GUICavityBlock(name, id, x, y); | ||
} | ||
} |
24 changes: 21 additions & 3 deletions
24
src/main/java/GUI/Blocks/Factories/MoveForwardGUIFactory.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUIFunctionalityBlock; | ||
|
||
/** | ||
* A factory to create move forward GUI blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class MoveForwardGUIFactory extends GUIFactory{ | ||
private String name = "Move Forward"; | ||
|
||
/** | ||
* Variable referring to the name of a move forward block. | ||
*/ | ||
private static final String name = "Move Forward"; | ||
|
||
|
||
/** | ||
* Create a new move forward block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new functional block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUIFunctionalityBlock createBlock(String id, int x, int y) { | ||
return new GUIFunctionalityBlock(name, id, x,y); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUIOperatorBlock; | ||
|
||
/** | ||
* A factory to create new not GUI blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class NotGUIFactory extends GUIFactory { | ||
private String name = "Not"; | ||
|
||
/** | ||
* Variable referring to the name of a not block. | ||
*/ | ||
private static final String name = "Not"; | ||
|
||
/** | ||
* Create a new not block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new operator block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUIOperatorBlock createBlock(String id, int x, int y) { | ||
return new GUIOperatorBlock(name, id, x,y); | ||
} | ||
} |
22 changes: 19 additions & 3 deletions
22
src/main/java/GUI/Blocks/Factories/TurnLeftGUIFactory.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUIFunctionalityBlock; | ||
|
||
/** | ||
* A factory to create turn left GUI blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class TurnLeftGUIFactory extends GUIFactory { | ||
private String name = "Turn Left"; | ||
|
||
/** | ||
* Variable referring to the name of an turn left block. | ||
*/ | ||
private static final String name = "Turn Left"; | ||
|
||
/** | ||
* Create a new turn left block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new functional block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUIFunctionalityBlock createBlock(String id, int x, int y) { | ||
return new GUIFunctionalityBlock(name, id, x, y); | ||
} | ||
} |
22 changes: 19 additions & 3 deletions
22
src/main/java/GUI/Blocks/Factories/TurnRightGUIFactory.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUIFunctionalityBlock; | ||
|
||
/** | ||
* Factory to create new turn right GUI block. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class TurnRightGUIFactory extends GUIFactory{ | ||
private String name = "Turn Right"; | ||
|
||
/** | ||
* Variable referring to the name of a turn right block. | ||
*/ | ||
private static final String name = "Turn Right"; | ||
|
||
/** | ||
* Create a new turn right block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new functional block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUIFunctionalityBlock createBlock(String id, int x, int y) { | ||
return new GUIFunctionalityBlock(name, id, x,y); | ||
} | ||
} |
23 changes: 20 additions & 3 deletions
23
src/main/java/GUI/Blocks/Factories/WallInFrontGUIFactory.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUIConditionalBlock; | ||
|
||
/** | ||
* Factory to create wall in front gui blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class WallInFrontGUIFactory extends GUIFactory{ | ||
private String name = "Wall In Front"; | ||
|
||
/** | ||
* Variable referring to the name of an wall in front block. | ||
*/ | ||
private static final String name = "Wall In Front"; | ||
|
||
/** | ||
* Create a new wall in front block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new conditional block with given coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUIConditionalBlock createBlock(String id, int x, int y) { | ||
return new GUIConditionalBlock(name, id, x,y); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
package GUI.Blocks.Factories; | ||
|
||
import GUI.Blocks.GUIBlock; | ||
import GUI.Blocks.GUICavityBlock; | ||
|
||
/** | ||
* A factory to create while GUI blocks. | ||
* | ||
* @author Alpha-team | ||
*/ | ||
public class WhileGUIFactory extends GUIFactory { | ||
private String name = "While"; | ||
|
||
/** | ||
* Variable referring to the name of a while block. | ||
*/ | ||
private static final String name = "While"; | ||
|
||
/** | ||
* Create a new while block with given id and coordinates. | ||
* | ||
* @param id The id for the block to create. | ||
* @param x The x coordinate for the block to create. | ||
* @param y The y coordinate for the block to create. | ||
* | ||
* @return A new cavity block block with given id and coordinates and the correct name. | ||
*/ | ||
@Override | ||
public GUIBlock createBlock(String id, int x, int y) { | ||
public GUICavityBlock createBlock(String id, int x, int y) { | ||
return new GUICavityBlock(name, id, x, y); | ||
} | ||
} |
Oops, something went wrong.