001 package rules;
002
003 import java.util.*;
004
005 import core.*;
006
007 /**
008 * A powerup or empty
009 *
010 */
011 public abstract class NoneSquare extends Piece
012 {
013 /**
014 * Constructs a new Empty instance
015 */
016 public NoneSquare()
017 {
018 super(Color.NONE, 0);
019 }
020
021 /**
022 * Empty instances cannot move
023 */
024 public Collection<Move> moveCandidates(GameState g, Position here)
025 {
026 throw new RuntimeException("moveCandidates on empty square");
027 }
028
029 /**
030 * Empty instances cannot threaten
031 */
032 public boolean threatens(GameState g, Position from, Position to)
033 {
034 throw new RuntimeException("canMove on empty square");
035 }
036
037 }