mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-07-30 03:35:26 +02:00
Kjører automtisk forbedring av importeringer og formatering
This commit is contained in:
@@ -18,7 +18,7 @@ import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
||||
import inf112.fiasko.roborally.objects.ProgrammingCard;
|
||||
import inf112.fiasko.roborally.objects.ProgrammingCardDeck;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@@ -9,12 +9,12 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||
import com.esotericsoftware.kryonet.Connection;
|
||||
import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper;
|
||||
import inf112.fiasko.roborally.gamewrapper.SimpleButton;
|
||||
import inf112.fiasko.roborally.networking.containers.GameStartInfoResponse;
|
||||
import inf112.fiasko.roborally.objects.Player;
|
||||
import inf112.fiasko.roborally.utility.IOUtil;
|
||||
import com.esotericsoftware.kryonet.Connection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@@ -874,7 +874,7 @@ public class Board {
|
||||
/**
|
||||
* Gets the new particle to use given the laser firing and the existing beam particle
|
||||
*
|
||||
* @param laserBeam The laser beam which is fired
|
||||
* @param laserBeam The laser beam which is fired
|
||||
* @param existingBeam The laser beam which already exists at a tile
|
||||
* @return The particle which is a combination of the two
|
||||
*/
|
||||
@@ -887,7 +887,7 @@ public class Board {
|
||||
int forwardBeamsLaser = getNumberOfForwardBeams(laserBeamType);
|
||||
int crossingBeamsLaser = getNumberOfPerpendicularBeams(laserBeamType);
|
||||
int forwardBeamsExisting = getNumberOfForwardBeams(existingBeamType);
|
||||
int crossingBeamsExisting = getNumberOfPerpendicularBeams(existingBeamType);
|
||||
int crossingBeamsExisting = getNumberOfPerpendicularBeams(existingBeamType);
|
||||
|
||||
//Flip number of beams if beams are perpendicular
|
||||
if (Direction.arePerpendicular(laserDirection, existingDirection)) {
|
||||
@@ -923,12 +923,12 @@ public class Board {
|
||||
/**
|
||||
* Gets the correct number of beams given existing beams and the beams to add
|
||||
*
|
||||
* @param newBeams The beam count of the new beam to add
|
||||
* @param newBeams The beam count of the new beam to add
|
||||
* @param existingBeams The beam count of the existing beam
|
||||
* @return The new number/thickness of beams/the beam
|
||||
*/
|
||||
private int getNumberOfBeams(int newBeams, int existingBeams) {
|
||||
if ((newBeams + existingBeams) != 0 &&(newBeams + existingBeams) % 3 == 0) {
|
||||
if ((newBeams + existingBeams) != 0 && (newBeams + existingBeams) % 3 == 0) {
|
||||
return 3;
|
||||
} else {
|
||||
return Math.max(newBeams, existingBeams);
|
||||
@@ -937,7 +937,8 @@ public class Board {
|
||||
|
||||
/**
|
||||
* Gets a new particle type with the given number of beams
|
||||
* @param forwardBeams The number of beams in the direction of the laser
|
||||
*
|
||||
* @param forwardBeams The number of beams in the direction of the laser
|
||||
* @param perpendicularBeams The number of beams in the perpendicular direction of the laser
|
||||
* @return The correct particle type to be displayed
|
||||
*/
|
||||
|
@@ -5,12 +5,15 @@ import inf112.fiasko.roborally.elementproperties.TileType;
|
||||
import inf112.fiasko.roborally.elementproperties.WallType;
|
||||
import inf112.fiasko.roborally.objects.Board;
|
||||
import inf112.fiasko.roborally.objects.Grid;
|
||||
import inf112.fiasko.roborally.objects.ListGrid;
|
||||
import inf112.fiasko.roborally.objects.Robot;
|
||||
import inf112.fiasko.roborally.objects.Tile;
|
||||
import inf112.fiasko.roborally.objects.Wall;
|
||||
import inf112.fiasko.roborally.objects.ListGrid;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@@ -1,17 +1,17 @@
|
||||
package inf112.fiasko.roborally.utility;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.esotericsoftware.kryonet.Connection;
|
||||
import inf112.fiasko.roborally.elementproperties.Direction;
|
||||
import inf112.fiasko.roborally.elementproperties.Position;
|
||||
import inf112.fiasko.roborally.elementproperties.RobotID;
|
||||
import inf112.fiasko.roborally.objects.Player;
|
||||
import inf112.fiasko.roborally.objects.Tile;
|
||||
import inf112.fiasko.roborally.objects.DrawableGame;
|
||||
import inf112.fiasko.roborally.objects.Wall;
|
||||
import inf112.fiasko.roborally.objects.Particle;
|
||||
import inf112.fiasko.roborally.objects.Robot;
|
||||
import inf112.fiasko.roborally.objects.DrawableObject;
|
||||
import com.esotericsoftware.kryonet.Connection;
|
||||
import inf112.fiasko.roborally.objects.Particle;
|
||||
import inf112.fiasko.roborally.objects.Player;
|
||||
import inf112.fiasko.roborally.objects.Robot;
|
||||
import inf112.fiasko.roborally.objects.Tile;
|
||||
import inf112.fiasko.roborally.objects.Wall;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
Reference in New Issue
Block a user