// Path: src/main/java/pl/letscode/tanks/engine/objects/Axis2D.java
// public enum Axis2D {
// 
// 	NORTH(0, -1), SOUTH(0, 1), EAST(1, 0), WEST(-1, 0), NONE(0, 0);
// 
// 	private double x;
// 	private double y;
// 
// 	private Axis2D(double x, double y) {
// 		this.x = x;
// 		this.y = y;
// 	}
// 
// 	public double getX() {
// 		return this.x;
// 	}
// 
// 	public double getY() {
// 		return this.y;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).addValue(this.x).addValue(this.y)
// 				.toString();
// 	}
// 
// }
// 
// Path: src/main/java/pl/letscode/tanks/engine/objects/ObjectIdGenerator.java
// @Singleton
// public class ObjectIdGenerator {
// 
// 	private long lastId = 0;
// 
// 	public long getNextId() {
// 		this.lastId++;
// 		return lastId;
// 	}
// }
// 
// Path: src/main/java/pl/letscode/tanks/player/Player.java
// public class Player {
// 
// 	private String name;
// 	private int score;
// 
// 	/* Constructors */
// 	
// 	public Player(String name, int score) {
// 		this.name = name;
// 		this.score = score;
// 	}
// 
// 	/* Read */
// 	
// 	public String getName() {
// 		return this.name;
// 	}
// 	
// 	public int getScore() {
// 		return this.score;
// 	}
// 	
// 	/* Commands */
// 	
// 	public void addFrag() {
// 		this.score++;
// 	}
// 
// 	/* Utilities */
// 	
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object == null)
// 			return false;
// 		if (this == object)
// 			return true;
// 		if (object instanceof Player) {
// 			Player player = (Player) object;
// 			if (player.getName().equals(this.name))
// 				return true;
// 			else
// 				return false;
// 		} else
// 			return false;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(this.name);
// 	}
// 
// }


import org.dyn4j.dynamics.Body;
import org.dyn4j.dynamics.BodyFixture;
import org.dyn4j.geometry.Mass.Type;
import org.dyn4j.geometry.Rectangle;
import pl.letscode.tanks.engine.objects.Axis2D;
import pl.letscode.tanks.engine.objects.ObjectIdGenerator;
import pl.letscode.tanks.player.Player;
import com.google.inject.Inject;
package pl.letscode.tanks.engine.objects.tank;




public class TankObjectFactory {

	private static final int DEFAULT_TANK_SIZE = 25;
	private static final int DEFAULT_TANK_HP = 3;
	private static final double DEFAULT_SPEED = 50;
	private static final Axis2D DEFAULT_FACING = Axis2D.SOUTH;
	private static final Axis2D DEFAULT_MOVEMENT = Axis2D.NONE;

	private final ObjectIdGenerator idGenerator;

	@Inject
	public TankObjectFactory(ObjectIdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public TankObject buildTank(Player player) {
		Body tankBody = buildBody();
		TankObject tankObject = new TankObject(tankBody,
				this.idGenerator.getNextId(), player, DEFAULT_TANK_HP,
				DEFAULT_SPEED, DEFAULT_FACING, DEFAULT_MOVEMENT);
		tankBody.setUserData(tankObject);
		return tankObject;
	}

	private Body buildBody() {
		Body body = new Body();
// Path: src/main/java/pl/letscode/tanks/engine/objects/Axis2D.java
// public enum Axis2D {
// 
// 	NORTH(0, -1), SOUTH(0, 1), EAST(1, 0), WEST(-1, 0), NONE(0, 0);
// 
// 	private double x;
// 	private double y;
// 
// 	private Axis2D(double x, double y) {
// 		this.x = x;
// 		this.y = y;
// 	}
// 
// 	public double getX() {
// 		return this.x;
// 	}
// 
// 	public double getY() {
// 		return this.y;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).addValue(this.x).addValue(this.y)
// 				.toString();
// 	}
// 
// }
// 
// Path: src/main/java/pl/letscode/tanks/engine/objects/ObjectIdGenerator.java
// @Singleton
// public class ObjectIdGenerator {
// 
// 	private long lastId = 0;
// 
// 	public long getNextId() {
// 		this.lastId++;
// 		return lastId;
// 	}
// }
// 
// Path: src/main/java/pl/letscode/tanks/player/Player.java
// public class Player {
// 
// 	private String name;
// 	private int score;
// 
// 	/* Constructors */
// 	
// 	public Player(String name, int score) {
// 		this.name = name;
// 		this.score = score;
// 	}
// 
// 	/* Read */
// 	
// 	public String getName() {
// 		return this.name;
// 	}
// 	
// 	public int getScore() {
// 		return this.score;
// 	}
// 	
// 	/* Commands */
// 	
// 	public void addFrag() {
// 		this.score++;
// 	}
// 
// 	/* Utilities */
// 	
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object == null)
// 			return false;
// 		if (this == object)
// 			return true;
// 		if (object instanceof Player) {
// 			Player player = (Player) object;
// 			if (player.getName().equals(this.name))
// 				return true;
// 			else
// 				return false;
// 		} else
// 			return false;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(this.name);
// 	}
// 
// }


// Path: src/main/java/pl/letscode/tanks/engine/objects/tank/TankObjectFactory.java
import org.dyn4j.dynamics.Body;
import org.dyn4j.dynamics.BodyFixture;
import org.dyn4j.geometry.Mass.Type;
import org.dyn4j.geometry.Rectangle;
import pl.letscode.tanks.engine.objects.Axis2D;
import pl.letscode.tanks.engine.objects.ObjectIdGenerator;
import pl.letscode.tanks.player.Player;
import com.google.inject.Inject;

package pl.letscode.tanks.engine.objects.tank;




public class TankObjectFactory {

	private static final int DEFAULT_TANK_SIZE = 25;
	private static final int DEFAULT_TANK_HP = 3;
	private static final double DEFAULT_SPEED = 50;
	private static final Axis2D DEFAULT_FACING = Axis2D.SOUTH;
	private static final Axis2D DEFAULT_MOVEMENT = Axis2D.NONE;

	private final ObjectIdGenerator idGenerator;

	@Inject
	public TankObjectFactory(ObjectIdGenerator idGenerator) {
		this.idGenerator = idGenerator;
	}

	public TankObject buildTank(Player player) {
		Body tankBody = buildBody();
		TankObject tankObject = new TankObject(tankBody,
				this.idGenerator.getNextId(), player, DEFAULT_TANK_HP,
				DEFAULT_SPEED, DEFAULT_FACING, DEFAULT_MOVEMENT);
		tankBody.setUserData(tankObject);
		return tankObject;
	}

	private Body buildBody() {
		Body body = new Body();
		Rectangle rectangle = new Rectangle(DEFAULT_TANK_SIZE,