001 package rules; 002 003 import java.util.*; 004 005 import core.*; 006 007 /** 008 * Empty piece. 009 * 010 */ 011 public class Upgrade extends NoneSquare 012 { 013 /** 014 * @see Piece 015 */ 016 public String getName() 017 { 018 return "u"; 019 } 020 021 /** 022 * Constructs a new Destroy instance 023 */ 024 public Upgrade() { } 025 026 public String pieceString() 027 { 028 return "powerup_upgrade"; 029 } 030 031 public void postMove(GameState gs, Map<Position, Piece> move, 032 Position here) { 033 move.put(here, new Queen(move.get(here).getColor(), 1)); 034 } 035 036 public int hashCode() { 037 return 15; 038 } 039 }