Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
small UML tweak, make robot implement IBoardElement
Browse files Browse the repository at this point in the history
  • Loading branch information
selfjell committed Feb 27, 2020
1 parent 35f5646 commit 1f54023
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 120 deletions.
55 changes: 28 additions & 27 deletions Deliverables/UML/Game.uml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,49 @@
<ID>JAVA</ID>
<OriginalElement>inf112.app.game</OriginalElement>
<nodes>
<node x="234.0" y="93.0">inf112.app.game.ICard</node>
<node x="222.0" y="293.0">inf112.app.game.MoveCard</node>
<node x="0.0" y="293.0">inf112.app.game.RotateCard</node>
<node x="0.0" y="533.0">inf112.app.game.MoveCardTest</node>
<node x="734.0" y="0.0">inf112.app.game.Application</node>
<node x="560.0" y="533.0">inf112.app.game.CardDeckTest</node>
<node x="460.0" y="0.0">inf112.app.game.CardDeck</node>
<node x="278.0" y="533.0">inf112.app.game.RotateCardTest</node>
<node x="0.0" y="731.0">inf112.app.game.CardStatusTest</node>
<node x="4.75" y="0.0">inf112.app.game.CardStatus</node>
<node x="245.75" y="118.0">inf112.app.game.ICard</node>
<node x="1.25" y="339.0">inf112.app.game.RotateCard</node>
<node x="232.25" y="339.0">inf112.app.game.MoveCard</node>
<node x="479.25" y="0.0">inf112.app.game.Application</node>
<node x="819.25" y="0.0">inf112.app.game.MoveCardTest</node>
<node x="0.0" y="565.0">inf112.app.game.CardDeckTest</node>
<node x="356.0" y="565.0">inf112.app.game.CardDeck</node>
<node x="645.0" y="565.0">inf112.app.game.RotateCardTest</node>
<node x="0.0" y="0.0">inf112.app.game.CardStatus</node>
<node x="0.0" y="881.0">inf112.app.game.CardStatusTest</node>
</nodes>
<notes />
<edges>
<edge source="inf112.app.game.RotateCard" target="inf112.app.game.CardStatus">
<point x="-50.5" y="-97.5" />
<point x="-45.75" y="121.5" />
<edge source="inf112.app.game.RotateCard" target="inf112.app.game.ICard">
<point x="52.75" y="-90.5" />
<point x="159.5" y="319.0" />
<point x="291.75" y="319.0" />
<point x="-46.0" y="26.5" />
</edge>
<edge source="inf112.app.game.MoveCard" target="inf112.app.game.ICard">
<point x="48.25" y="-97.5" />
<point x="44.25" y="28.5" />
<point x="50.5" y="-90.5" />
<point x="46.0" y="26.5" />
</edge>
<edge source="inf112.app.game.MoveCard" target="inf112.app.game.CardStatus">
<point x="-48.25" y="-97.5" />
<point x="270.25" y="263.0" />
<point x="142.0" y="263.0" />
<point x="45.75" y="121.5" />
<point x="-50.5" y="-90.5" />
<point x="282.75" y="309.0" />
<point x="162.0" y="309.0" />
<point x="54.0" y="144.5" />
</edge>
<edge source="inf112.app.game.RotateCard" target="inf112.app.game.ICard">
<point x="50.5" y="-97.5" />
<point x="151.5" y="273.0" />
<point x="278.25" y="273.0" />
<point x="-44.25" y="28.5" />
<edge source="inf112.app.game.RotateCard" target="inf112.app.game.CardStatus">
<point x="-52.75" y="-90.5" />
<point x="-54.0" y="144.5" />
</edge>
</edges>
<settings layout="Hierarchic Group" zoom="1.0" x="196.5" y="524.5" />
<settings layout="Hierarchic Group" zoom="0.5534825870646766" x="450.0" y="382.00000000000006" />
<SelectedNodes>
<node>inf112.app.game.CardStatus</node>
</SelectedNodes>
<Categories>
<Category>Properties</Category>
<Category>Methods</Category>
<Category>Constructors</Category>
<Category>Methods</Category>
<Category>Properties</Category>
<Category>Fields</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
Expand Down
19 changes: 10 additions & 9 deletions Deliverables/UML/app.uml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@
<ID>JAVA</ID>
<OriginalElement>inf112.app</OriginalElement>
<nodes>
<node x="212.0" y="417.0">inf112.app.game</node>
<node x="0.0" y="417.0">inf112.app.objects</node>
<node x="246.0" y="315.0">inf112.app.Main</node>
<node x="397.0" y="417.0">inf112.app.map</node>
<node x="0.0" y="315.0">inf112.app.ExampleMockedTest</node>
<node x="182.0" y="434.0">inf112.app.game</node>
<node x="0.0" y="434.0">inf112.app.objects</node>
<node x="212.0" y="336.0">inf112.app.Main</node>
<node x="343.0" y="434.0">inf112.app.map</node>
<node x="0.0" y="0.0">inf112.app.GdxTestRunner</node>
<node x="0.0" y="336.0">inf112.app.ExampleMockedTest</node>
</nodes>
<notes />
<edges />
<settings layout="Hierarchic Group" zoom="1.0" x="172.0" y="198.5" />
<settings layout="Hierarchic Group" zoom="1.0" x="172.0" y="202.5" />
<SelectedNodes>
<node>inf112.app.game</node>
</SelectedNodes>
<Categories>
<Category>Inner Classes</Category>
<Category>Properties</Category>
<Category>Methods</Category>
<Category>Constructors</Category>
<Category>Methods</Category>
<Category>Properties</Category>
<Category>Inner Classes</Category>
<Category>Fields</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
Expand Down
25 changes: 13 additions & 12 deletions Deliverables/UML/map.uml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
<ID>JAVA</ID>
<OriginalElement>inf112.app.map</OriginalElement>
<nodes>
<node x="539.0" y="532.0">inf112.app.map.CellInventory</node>
<node x="0.0" y="0.0">inf112.app.map.Map</node>
<node x="398.0" y="0.0">inf112.app.map.CellInventory</node>
<node x="515.0" y="603.0">inf112.app.map.MapTest</node>
<node x="0.0" y="825.0">inf112.app.map.MapCellListTest</node>
<node x="264.0" y="603.0">inf112.app.map.MapCellTest</node>
<node x="0.0" y="603.0">inf112.app.map.CellInventoryTest</node>
<node x="490.0" y="312.0">inf112.app.map.MapCell</node>
<node x="0.0" y="312.0">inf112.app.map.MapCellList</node>
<node x="350.0" y="848.0">inf112.app.map.MapCellListTest</node>
<node x="908.0" y="532.0">inf112.app.map.MapTest</node>
<node x="0.0" y="532.0">inf112.app.map.MapCellTest</node>
<node x="256.0" y="532.0">inf112.app.map.CellInventoryTest</node>
<node x="0.0" y="848.0">inf112.app.map.MapCell</node>
<node x="421.0" y="0.0">inf112.app.map.MapCellList</node>
</nodes>
<notes />
<edges />
<settings layout="Hierarchic Group" zoom="1.0" x="178.5" y="666.5" />
<settings layout="Hierarchic Group" zoom="0.4723991507430998" x="397.5" y="451.0" />
<SelectedNodes>
<node>inf112.app.map.Map</node>
<node>inf112.app.map.CellInventory</node>
</SelectedNodes>
<Categories>
<Category>Inner Classes</Category>
<Category>Properties</Category>
<Category>Methods</Category>
<Category>Constructors</Category>
<Category>Methods</Category>
<Category>Properties</Category>
<Category>Inner Classes</Category>
<Category>Fields</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
Expand Down
137 changes: 72 additions & 65 deletions Deliverables/UML/objects.uml
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,98 @@
<ID>JAVA</ID>
<OriginalElement>inf112.app.objects</OriginalElement>
<nodes>
<node x="934.0" y="1065.0">inf112.app.objects.IDTranslator</node>
<node x="405.25" y="341.0">inf112.app.objects.Direction.Rotation</node>
<node x="995.5" y="1172.0">inf112.app.objects.IDTranslator.ElemEnum</node>
<node x="643.0" y="1065.0">inf112.app.objects.ObjectFactoryTest</node>
<node x="0.0" y="0.0">inf112.app.objects.Position</node>
<node x="0.0" y="606.0">inf112.app.objects.RepairStation</node>
<node x="987.0" y="1287.0">inf112.app.objects.CogTest</node>
<node x="0.0" y="1065.0">inf112.app.objects.PlayerTest</node>
<node x="437.49999999999994" y="456.0">inf112.app.objects.IBoardElement</node>
<node x="587.0" y="1287.0">inf112.app.objects.PlayerListTest</node>
<node x="274.25" y="341.0">inf112.app.objects.Direction.DirEnum</node>
<node x="0.0" y="777.0">inf112.app.objects.Player</node>
<node x="1159.0" y="1287.0">inf112.app.objects.RepairStationTest</node>
<node x="0.0" y="1458.0">inf112.app.objects.ConveyorTest</node>
<node x="1222.0" y="1065.0">inf112.app.objects.WallTest</node>
<node x="996.0" y="777.0">inf112.app.objects.Robot</node>
<node x="252.0" y="0.0">inf112.app.objects.Direction</node>
<node x="806.0" y="1287.0">inf112.app.objects.FlagTest</node>
<node x="888.0" y="583.5">inf112.app.objects.Cog</node>
<node x="351.0" y="1065.0">inf112.app.objects.PositionTest</node>
<node x="184.99999999999994" y="549.0">inf112.app.objects.Flag</node>
<node x="668.0" y="606.0">inf112.app.objects.Conveyor</node>
<node x="664.0" y="777.0">inf112.app.objects.DirectionTest</node>
<node x="391.99999999999994" y="537.0">inf112.app.objects.Wall</node>
<node x="271.0" y="777.0">inf112.app.objects.ObjectFactory</node>
<node x="0.0" y="1287.0">inf112.app.objects.PlayerList</node>
<node x="251.0" y="1287.0">inf112.app.objects.RobotTest</node>
<node x="1069.0" y="456.0">inf112.app.objects.IDTranslatorTest</node>
<node x="350.0" y="0.0">inf112.app.objects.IDTranslator</node>
<node x="160.75" y="383.0">inf112.app.objects.Direction.Rotation</node>
<node x="397.5" y="103.0">inf112.app.objects.IDTranslator.ElemEnum</node>
<node x="402.0" y="882.0">inf112.app.objects.ObjectFactoryTest</node>
<node x="523.0" y="678.0">inf112.app.objects.RepairStation</node>
<node x="647.0" y="0.0">inf112.app.objects.Position</node>
<node x="900.0" y="1470.0">inf112.app.objects.CogTest</node>
<node x="0.0" y="1198.0">inf112.app.objects.PlayerTest</node>
<node x="621.0" y="525.0">inf112.app.objects.IBoardElement</node>
<node x="496.0" y="1470.0">inf112.app.objects.PlayerListTest</node>
<node x="43.75" y="361.0">inf112.app.objects.Direction.DirEnum</node>
<node x="705.0" y="882.0">inf112.app.objects.Player</node>
<node x="1076.0" y="1470.0">inf112.app.objects.RepairStationTest</node>
<node x="1288.0" y="1470.0">inf112.app.objects.ConveyorTest</node>
<node x="272.0" y="1470.0">inf112.app.objects.WallTest</node>
<node x="1084.0" y="614.0">inf112.app.objects.Robot</node>
<node x="0.0" y="0.0">inf112.app.objects.Direction</node>
<node x="716.0" y="1470.0">inf112.app.objects.FlagTest</node>
<node x="706.0" y="678.0">inf112.app.objects.Cog</node>
<node x="1066.0" y="1198.0">inf112.app.objects.PositionTest</node>
<node x="867.0" y="646.0">inf112.app.objects.Flag</node>
<node x="291.99999999999994" y="656.0">inf112.app.objects.Conveyor</node>
<node x="0.0" y="635.0">inf112.app.objects.Wall</node>
<node x="363.0" y="1198.0">inf112.app.objects.DirectionTest</node>
<node x="987.0" y="882.0">inf112.app.objects.ObjectFactory</node>
<node x="0.0" y="1470.0">inf112.app.objects.PlayerList</node>
<node x="712.0" y="1198.0">inf112.app.objects.RobotTest</node>
<node x="0.0" y="882.0">inf112.app.objects.IDTranslatorTest</node>
</nodes>
<notes />
<edges>
<edge source="inf112.app.objects.Flag" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-85.5" />
<point x="278.49999999999994" y="517.0" />
<point x="486.99999999999994" y="517.0" />
<point x="-33.0" y="15.5" />
<point x="0.0" y="-79.5" />
<point x="965.5" y="584.0" />
<point x="725.25" y="584.0" />
<point x="34.75" y="14.5" />
</edge>
<edge source="inf112.app.objects.IDTranslator.ElemEnum" target="inf112.app.objects.IDTranslator">
<point x="0.0" y="-15.5" />
<point x="0.0" y="28.5" />
<point x="0.0" y="-158.5" />
<point x="0.0" y="26.5" />
</edge>
<edge source="inf112.app.objects.RepairStation" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-28.5" />
<point x="82.5" y="507.0" />
<point x="453.99999999999994" y="507.0" />
<point x="-66.0" y="15.5" />
</edge>
<edge source="inf112.app.objects.Cog" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-51.0" />
<point x="956.0" y="507.0" />
<point x="586.0" y="507.0" />
<point x="66.0" y="15.5" />
<point x="0.0" y="-47.5" />
<point x="604.5" y="594.0" />
<point x="678.9166666666665" y="594.0" />
<point x="-11.583333333333371" y="14.5" />
</edge>
<edge source="inf112.app.objects.Wall" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-97.5" />
<point x="0.0" y="15.5" />
<point x="0.0" y="-90.5" />
<point x="136.0" y="574.0" />
<point x="632.5833333333333" y="574.0" />
<point x="-57.91666666666663" y="14.5" />
</edge>
<edge source="inf112.app.objects.Cog" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-47.5" />
<point x="776.5" y="594.0" />
<point x="702.0833333333333" y="594.0" />
<point x="11.583333333333371" y="14.5" />
</edge>
<edge source="inf112.app.objects.Direction.DirEnum" target="inf112.app.objects.Direction">
<point x="0.0" y="-15.5" />
<point x="329.75" y="316.0" />
<point x="324.75" y="316.0" />
<point x="-72.75" y="145.5" />
<point x="0.0" y="-59.5" />
<point x="92.25" y="336.0" />
<point x="76.25" y="336.0" />
<point x="-76.25" y="155.5" />
</edge>
<edge source="inf112.app.objects.Conveyor" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-28.5" />
<point x="768.0" y="517.0" />
<point x="553.0" y="517.0" />
<point x="33.0" y="15.5" />
<point x="0.0" y="-69.5" />
<point x="397.49999999999994" y="584.0" />
<point x="655.75" y="584.0" />
<point x="-34.75" y="14.5" />
</edge>
<edge source="inf112.app.objects.Robot" target="inf112.app.objects.IBoardElement">
<point x="0.0" y="-111.5" />
<point x="1176.5" y="574.0" />
<point x="748.4166666666667" y="574.0" />
<point x="57.91666666666674" y="14.5" />
</edge>
<edge source="inf112.app.objects.Direction.Rotation" target="inf112.app.objects.Direction">
<point x="0.0" y="-15.5" />
<point x="465.25" y="316.0" />
<point x="470.25" y="316.0" />
<point x="72.75" y="145.5" />
<point x="0.0" y="-37.5" />
<point x="212.75" y="336.0" />
<point x="228.75" y="336.0" />
<point x="76.25" y="155.5" />
</edge>
</edges>
<settings layout="Hierarchic Group" zoom="0.8539156626506024" x="584.9118165784832" y="312.0" />
<SelectedNodes>
<node>inf112.app.objects.IDTranslator</node>
</SelectedNodes>
<settings layout="Hierarchic Group" zoom="1.0" x="507.0" y="202.5" />
<SelectedNodes />
<Categories>
<Category>Inner Classes</Category>
<Category>Properties</Category>
<Category>Methods</Category>
<Category>Constructors</Category>
<Category>Methods</Category>
<Category>Properties</Category>
<Category>Inner Classes</Category>
<Category>Fields</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/inf112/app/objects/Robot.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package inf112.app.objects;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.math.Vector2;
import inf112.app.map.Map;
import inf112.app.objects.Direction.Rotation;
Expand All @@ -9,7 +8,7 @@
* This class is a representation of the robots
* on the board
*/
public class Robot extends Game {
public class Robot implements IBoardElement {
private Map map;
private Position pos;
private Vector2 vectorPos;
Expand All @@ -20,11 +19,6 @@ public Robot(Position pos, Map map){
vectorPos = new Vector2(pos.getXCoordinate(),pos.getYCoordinate());
}

@Override
public void create() {

}

/**
* Method to move the robot forward in the direction it is facing
* @param steps Number of steps the robot should take
Expand Down

0 comments on commit 1f54023

Please sign in to comment.