Skip to content
Snippets Groups Projects
Commit 6d0f37b4 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

fixed #17 and adjusted max ball speed

parent 96dc800d
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 6 deletions
Manifest-Version: 1.0
Main-Class: de.bricked.main.Main
bin/de/bricked/resources/textures/paddle/paddle-extra-small.png

57.2 KiB

bin/de/bricked/resources/textures/paddle/paddle-large.png

85.4 KiB

bin/de/bricked/resources/textures/paddle/paddle-medium.png

80.8 KiB

bin/de/bricked/resources/textures/paddle/paddle-small.png

67 KiB

bin/de/bricked/resources/textures/paddle/paddle.png

1.22 KiB

File added
File added
File added
File added
File added
notes/textures/Paddle-edge.png

12.7 KiB

File added
notes/textures/Paddle-middle.png

44.9 KiB

......@@ -21,7 +21,7 @@ public class Game
private int points;
private Board board;
private final double speedIncreasePerPaddleHitFactor = 1.05;
private final double maxTotalSpeed = 9.0;
private final double maxTotalSpeed = 8.0;
public Game()
{
......
......@@ -2,17 +2,19 @@ package de.bricked.game.paddle;
public enum PaddleSize
{
SMALL(0.1),
MEDIUM(0.2),
LARGE(0.3),
EXTRA_LARGE(0.4);
SMALL(0.1, "paddle-small"),
MEDIUM(0.2, "paddle-medium"),
LARGE(0.3, "paddle-large"),
EXTRA_LARGE(0.4, "paddle-large");
private double sizeFactor;
private String textureID;
private static PaddleSize[] paddleSizes = PaddleSize.values();
PaddleSize(double sizeFactor)
PaddleSize(double sizeFactor, String textureID)
{
this.sizeFactor = sizeFactor;
this.textureID = textureID;
}
public static PaddleSize getPaddleSize(double size)
......@@ -32,6 +34,11 @@ public enum PaddleSize
return sizeFactor;
}
public String getTextureID()
{
return textureID;
}
private static int getPaddleIndex(PaddleSize paddleSize)
{
//find index of paddle in array
......
src/de/bricked/resources/textures/paddle/paddle-extra-small.png

57.2 KiB

src/de/bricked/resources/textures/paddle/paddle-large.png

85.4 KiB

src/de/bricked/resources/textures/paddle/paddle-medium.png

80.8 KiB

src/de/bricked/resources/textures/paddle/paddle-small.png

67 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment