mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor: removed unused and outdated code
This commit is contained in:
parent
97be82d3a4
commit
915e1308eb
10 changed files with 0 additions and 243 deletions
|
|
@ -1,63 +0,0 @@
|
|||
package mage.cards.action.impl;
|
||||
|
||||
import mage.cards.action.ActionCallback;
|
||||
import mage.cards.action.TransferData;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
|
||||
/**
|
||||
* Callback that does nothing on any action
|
||||
*
|
||||
* @author nantuko84
|
||||
*/
|
||||
public class EmptyCallback implements ActionCallback {
|
||||
|
||||
@Override
|
||||
public void mouseMoved(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDragged(MouseEvent e, TransferData data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseExited(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseWheelMoved(int mouseWheelRotation, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideOpenComponents() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e, TransferData data, boolean doubleClick) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e, TransferData data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void popupMenuCard(MouseEvent e, TransferData data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void popupMenuPanel(MouseEvent e, Component sourceComponent) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package mage.filters;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.BufferedImageOp;
|
||||
import java.awt.image.ColorModel;
|
||||
|
||||
/**
|
||||
* Mage abstract class that implements single-input/single-output
|
||||
* operations performed on {@link java.awt.image.BufferedImage}.
|
||||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public abstract class MageBufferedImageOp implements BufferedImageOp {
|
||||
|
||||
/**
|
||||
* Creates compatible image for @param src image.
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dest) {
|
||||
if (dest == null) {
|
||||
dest = src.getColorModel();
|
||||
}
|
||||
return new BufferedImage(dest, dest.createCompatibleWritableRaster(src.getWidth(), src.getHeight()), dest.isAlphaPremultiplied(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderingHints getRenderingHints() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle2D getBounds2D(BufferedImage src) {
|
||||
return new Rectangle(0, 0, src.getWidth(), src.getHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point2D getPoint2D(Point2D srcPt, Point2D destPt) {
|
||||
if (destPt == null) {
|
||||
destPt = new Point2D.Double();
|
||||
}
|
||||
destPt.setLocation(srcPt.getX(), srcPt.getY());
|
||||
return destPt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ARGB pixels from image. Solves the performance
|
||||
* issue of BufferedImage.getRGB method.
|
||||
*/
|
||||
public int[] getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) {
|
||||
int type = image.getType();
|
||||
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
|
||||
return (int[]) image.getRaster().getDataElements(x, y, width, height, pixels);
|
||||
}
|
||||
return image.getRGB(x, y, width, height, pixels, 0, width);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets ARGB pixels in image. Solves the performance
|
||||
* issue of BufferedImage.setRGB method.
|
||||
*/
|
||||
public void setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) {
|
||||
int type = image.getType();
|
||||
if (type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB) {
|
||||
image.getRaster().setDataElements(x, y, width, height, pixels);
|
||||
} else {
|
||||
image.setRGB(x, y, width, height, pixels, 0, width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package mage.utils;
|
||||
|
||||
import mage.view.TableView;
|
||||
|
||||
/**
|
||||
* Used to write less code for ActionWithResult anonymous classes with UUID return type.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public abstract class ActionWithUUIDResult extends ActionWithNullNegativeResult<TableView> {
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package mage.server.challenge;
|
||||
|
||||
import mage.constants.Zone;
|
||||
import mage.game.match.Match;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* C U R R E N T L Y U N U S E D
|
||||
*
|
||||
* Loads challenges from scenarios.
|
||||
* Configure games by initializing starting game board.
|
||||
*/
|
||||
public enum ChallengeManager {
|
||||
|
||||
instance;
|
||||
|
||||
public void prepareChallenge(UUID playerId, Match match) {
|
||||
Map<Zone, String> commands = new HashMap<>();
|
||||
commands.put(Zone.OUTSIDE, "life:3");
|
||||
match.getGame().cheat(playerId, commands);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package mage.server.exceptions;
|
||||
|
||||
/**
|
||||
* Created by igoudt on 14-1-2017.
|
||||
*/
|
||||
public class UserNotFoundException extends Exception {
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ package mage.server.managers;
|
|||
import mage.game.Game;
|
||||
import mage.server.ChatSession;
|
||||
import mage.server.DisconnectReason;
|
||||
import mage.server.exceptions.UserNotFoundException;
|
||||
import mage.view.ChatMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
package mage.server.services;
|
||||
|
||||
/**
|
||||
* Responsible for gathering logs and storing them in DB.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface LogService {
|
||||
|
||||
/**
|
||||
* Logs any information
|
||||
*
|
||||
* @param key Log key. Should be the same for the same types of logs.
|
||||
* @param args Any parameters in string representation.
|
||||
*/
|
||||
void log(String key, String... args);
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package mage.server.services;
|
||||
|
||||
/**
|
||||
* Common interface for all services.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public interface MageService {
|
||||
/**
|
||||
* Restores data on startup.
|
||||
*/
|
||||
void initService();
|
||||
|
||||
/**
|
||||
* Dumps data to DB.
|
||||
*/
|
||||
void saveData();
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
|
||||
package mage.abilities.costs;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class AbilityCosts implements Serializable {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
|
||||
package mage.game.events;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public interface MageEvent extends Serializable {
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue