Skip to content

Commit 4150eff

Browse files
committed
hotfile-v1.5
1 parent cffea6b commit 4150eff

17 files changed

+75
-72
lines changed

Archer.ctxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=Archer
3-
comment0.text=\r\n\ Class\ Archer\ creates\ and\ draws\ the\ archers\ on\ the\ Canvas.\r\n\ This\ class\ is\ able\ to\ move\ the\ archers\ from\ right\ to\ left\ /\ left\ to\ right.\r\n\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ Class\ Archer\ creates\ and\ draws\ the\ archers\ on\ the\ Canvas.\r\n\ This\ class\ is\ able\ to\ move\ the\ archers\ from\ right\ to\ left\ /\ left\ to\ right.\r\n\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=inputplayer\ archercolor\ usedcanvas
55
comment1.target=Archer(int,\ java.awt.Color,\ Canvas)
66
comment1.text=\r\n\ Constructor\ for\ instances\ of\ Archer\r\n\r\n\ @param\ inputplayer\ \ \ \ current\ player\r\n\ @param\ archercolor\ \ \ color\ of\ the\ archer\r\n\ @param\ usedcanvas\ \ canvas\ where\ to\ plot\ the\ arrow\r\n

Archer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Simon Cirdei
1212
* Christoph Schramm
1313
*
14-
* @version v1.4 (03.06.2022 15:35)
14+
* @version v1.5 (03.06.2022 19:20)
1515
*/
1616
public class Archer extends Game
1717
{

Arrow.class

0 Bytes
Binary file not shown.

Arrow.ctxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=Arrow
3-
comment0.text=\r\n\ Class\ Arrow\ calculates\ the\ trajectory\ of\ the\ "arrow".\ \r\n\ This\ class\ is\ able\ to\ draw\ and\ erase\ the\ arrow.\r\n\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ Class\ Arrow\ calculates\ the\ trajectory\ of\ the\ "arrow".\ \r\n\ This\ class\ is\ able\ to\ draw\ and\ erase\ the\ arrow.\r\n\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=inputcolor\ usedcanvas
55
comment1.target=Arrow(java.awt.Color,\ Canvas)
66
comment1.text=\r\n\ Constructor\ for\ instances\ of\ Arrow\r\n\r\n\ @param\ inputcolor\ \ color\ of\ the\ arrow\r\n\ @param\ usedcanvas\ \ canvas\ where\ to\ plot\ the\ arrow\r\n

Arrow.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
* Simon Cirdei
1313
* Christoph Schramm
1414
*
15-
* @version v1.4 (03.06.2022 15:35)
15+
* @version v1.5 (03.06.2022 19:20)
1616
*/
17-
1817
public class Arrow extends Game
1918
{
2019
private Color localcolor, colpl1, colpl2; // local variant of color of the arrow

CanvasBG.class

0 Bytes
Binary file not shown.

CanvasBG.ctxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=CanvasBG
3-
comment0.text=\r\n\ The\ class\ CanvasBG\ is\ one\ of\ the\ most\ important\ classes\ for\ the\ game\ 2Darts.\r\n\ The\ class\ is\ able\ to\ draw\:\ \r\n\ \ \ \ \ \ \ \ \ \ -\ the\ target\ of\ the\ dartboard\ \r\n\ \ \ \ \ \ \ \ \ \ -\ the\ two\ archers\r\n\ \ \ \ \ \ \ \ \ \ -\ the\ score\ of\ both\ players\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ CanvasBG\ also\ moves\ the\ arrow\ trough\ the\ dashboard.\ Loops\ calculates\ the\ positions\ and\ points.\r\n\ The\ change\ of\ the\ players\ is\ also\ implemented\ here.\ \r\n\ \r\n\ @author\ \ \ \ \ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \r\n\ @version\ \ \ \ \ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ The\ class\ CanvasBG\ is\ one\ of\ the\ most\ important\ classes\ for\ the\ game\ 2Darts.\r\n\ The\ class\ is\ able\ to\ draw\:\ \r\n\ \ \ \ \ \ \ \ \ \ -\ the\ target\ of\ the\ dartboard\ \r\n\ \ \ \ \ \ \ \ \ \ -\ the\ two\ archers\r\n\ \ \ \ \ \ \ \ \ \ -\ the\ score\ of\ both\ players\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ CanvasBG\ also\ moves\ the\ arrow\ trough\ the\ dashboard.\ Loops\ calculates\ the\ positions\ and\ points.\r\n\ The\ change\ of\ the\ players\ is\ also\ implemented\ here.\ \r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=inputa\ starttarget
55
comment1.target=CanvasBG(short,\ int)
66
comment1.text=\r\n\ Constructor\ for\ instances\ of\ the\ CanvasBG\ (dashboard)\r\n\r\n\ @param\ inputa\ \ \ \ \ \ \ \ input\ from\ user\ for\ target\ size\r\n\ @param\ startarget\ \ \ \ input\ from\ user\ for\ beginning\ of\ target\r\n

CanvasBG.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
* CanvasBG also moves the arrow trough the dashboard. Loops calculates the positions and points.
1313
* The change of the players is also implemented here.
1414
*
15-
* @author Johannes Richter
16-
* Simon Cirdei
17-
* Christoph Schramm
18-
*
19-
* @version v1.4 (03.06.2022 15:35)
15+
* @author Johannes Richter
16+
* Simon Cirdei
17+
* Christoph Schramm
18+
*
19+
* @version v1.5 (03.06.2022 19:20)
2020
*/
2121
public class CanvasBG extends Game
2222
{

Game.class

-9 Bytes
Binary file not shown.

Game.ctxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=Game
3-
comment0.text=\r\n\ \r\n\ @author\ JR,\ CS,\ SVC\r\n\ @version\ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=args
55
comment1.target=void\ main(java.lang.String[])
66
comment2.params=

Game.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
/**
44
*
5-
* @author JR, CS, SVC
6-
* @version v1.4 (03.06.2022 15:35)
5+
* @author Johannes Richter
6+
* Simon Cirdei
7+
* Christoph Schramm
8+
*
9+
* @version v1.5 (03.06.2022 19:20)
710
*/
811
public class Game
912
{
1013
private Terminal terminal; //Global terminal
11-
protected final String version = "v1.4"; //This version number
14+
protected final String version = "v1.5"; //This version number
1215
protected static int canvasHeight = 700; //Height of the canvas in px. Default: 700
1316
protected static int canvasWidth = 1000; //Width of the canvas in px. Default: 1000
1417
protected static int wallStart = 100; //Start of the wall in px. Default: 100
@@ -23,7 +26,7 @@ public class Game
2326
protected static final double timestep = 0.05; //Seconds of difference for trajectory calc. Default: 0.05
2427
protected static double angleMin = 10; //Minimum angle of the arrow in degrees. Default: 10
2528
protected static double angleMax = 60; //Maximum angle of the arrow in degrees. Default: 60
26-
protected static double speedMin = 7; //Minimum speed of the arrow in px/s. Default: 7
29+
protected static double speedMin = 10; //Minimum speed of the arrow in px/s. Default: 10
2730
protected static double speedMax = 25; //Maximum speed of the arrow in px/s. Default: 25
2831
protected static final int player = 2; //Number of players Default: 2
2932
protected static final short qsA = 30; //value A for quickstart

Points.ctxt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=Points
3-
comment0.text=\r\n\ The\ class\ points\ sets\ the\ color\ of\ the\ player-scores\ \r\n\ and\ prints\ the\ scores\ on\ the\ dashboard.\r\n\ \r\n\ @author\ \ \ \ \ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ \ \ \ \ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ The\ class\ points\ sets\ the\ color\ of\ the\ player-scores\ \r\n\ and\ prints\ the\ scores\ on\ the\ dashboard.\r\n\ \r\n\ @author\ \ \ \ \ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ \ \ \ \ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=playerno\ playerscore\ usedcanvas
55
comment1.target=Points(int,\ int,\ Canvas)
66
comment1.text=\r\n\ Constructor\ for\ instances\ of\ Points\r\n\r\n\ @param\ playerno\ \ \ \ current\ player\r\n\ @param\ playerscore\ score\ of\ player\ \ \ \ \r\n\ @param\ usedcanvas\ \ canvas\ where\ to\ plot\ the\ points/score\ \r\n

Points.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Simon Cirdei
99
* Christoph Schramm
1010
*
11-
* @version v1.4 (03.06.2022 15:35)
11+
* @version v1.5 (03.06.2022 19:20)
1212
*/
1313
public class Points extends Game
1414
{

Terminal.class

312 Bytes
Binary file not shown.

Terminal.ctxt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#BlueJ class context
22
comment0.target=Terminal
3-
comment0.text=\r\n\ \r\n\ The\ Terminal\ creates\ the\ field/dashboard.\r\n\ It\ is\ also\ able\ to\ open\ a\ console\ for\ the\ input\ of\ the\ game\ instructions.\r\n\ Terminal\ gets\ and\ checks\ the\ user\ inputs.\r\n\ \r\n\ One\ important\ thing\ is\ to\ give\ messages\ and\ feedback\ to\ the\ user.\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ game\ instruction\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ hints\ for\ inputs\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ help\r\n\ \r\n\ @author\ \ \ \ \ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ @version\ \ \ \ \ v1.4\ (03.06.2022\ 15\:35)\r\n
3+
comment0.text=\r\n\ \r\n\ The\ Terminal\ creates\ the\ field/dashboard.\r\n\ It\ is\ also\ able\ to\ open\ a\ console\ for\ the\ input\ of\ the\ game\ instructions.\r\n\ Terminal\ gets\ and\ checks\ the\ user\ inputs.\r\n\ \r\n\ One\ important\ thing\ is\ to\ give\ messages\ and\ feedback\ to\ the\ user.\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ game\ instruction\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ hints\ for\ inputs\r\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ help\r\n\ \r\n\ @author\ \ Johannes\ Richter\r\n\ \ \ \ \ \ \ \ \ \ Simon\ Cirdei\r\n\ \ \ \ \ \ \ \ \ \ Christoph\ Schramm\r\n\ \ \ \ \ \ \ \ \ \ \r\n\ @version\ v1.5\ (03.06.2022\ 19\:20)\r\n
44
comment1.params=
55
comment1.target=void\ newGame()
66
comment1.text=\r\n\ The\ method\ game\ checks\ all\ the\ inputs\ of\ the\ players\ and\ runs\ selected\ loops.\r\n\ Instructions\ and\ errors/feedback\ will\ be\ given\r\n
@@ -16,8 +16,8 @@ comment2.text=\r\n\ The\ method\ checks\ explicity\ the\ user\ input\ for\ the\
1616
comment3.params=
1717
comment3.target=void\ inputForDeveloperMode()
1818
comment3.text=\r\n\ The\ method\ checks\ explicity\ the\ user\ input\ for\ the\ target-size\r\n
19-
comment4.params=
20-
comment4.target=void\ startGame()
19+
comment4.params=restart
20+
comment4.target=void\ startGame(boolean)
2121
comment4.text=\r\n\ the\ method\ starts\ the\ game\:\r\n\ \ \ \ \ \ \ \ \ \ -\ inputs\ will\ be\ collected\r\n\ \ \ \ \ \ \ \ \ \ -\ score\ is\ initialised\ to\ zero\r\n\ \ \ \ \ \ \ \ \ \ -\ rounds\ is\ initialised\ to\ 1\r\n\ \ \ \ \ \ \ \ \ \ -\ the\ first\ player\ player\ becomes\ the\ currentplayer\r\n\ \ \ \ \ \ \ \ \ \ -\ a\ new\ surface\ (canvas)\ will\ be\ opened\r\n\ \ \ \ \ \ \ \ \ \ -\ printing\ of\ score\ and\ archers\r\n
2222
comment5.params=
2323
comment5.target=void\ swapPlayers()

0 commit comments

Comments
 (0)