1 /****************************************************************************** 2 * AnimateEventCantMove.java - Run the "Can't Move" animation 3 * $Id$ 4 * 5 * BuckoFIBS - Backgammon by BuckoSoft 6 * Copyright© 2011 - Dick Balaska - BuckoSoft, Corp. 7 * 8 * $Log$ 9 * Revision 1.1 2011/05/22 22:56:08 dick 10 * c.b.f.B.g.boardTab.board becomes c.b.f.B.g.boardTab.boardPane . 11 * 12 * Revision 1.2 2011/05/21 06:09:37 dick 13 * Javadoc. 14 * 15 * Revision 1.1 2011/05/21 05:06:00 dick 16 * Please move so many pieces. 17 * 18 * Revision 1.2 2011/05/17 22:50:04 dick 19 * AnimateEvent moves to c.b.f.B.g.b.b which is where it is used. 20 * 21 * Revision 1.1 2011/05/16 14:18:11 dick 22 * Run the "Can't Move" animation. 23 * 24 */ 25 26 /* 27 * This program is free software: you can redistribute it and/or modify 28 * it under the terms of the GNU General Public License as published by 29 * the Free Software Foundation, either version 3 of the License, or 30 * (at your option) any later version. 31 * 32 * This program is distributed in the hope that it will be useful, 33 * but WITHOUT ANY WARRANTY; without even the implied warranty of 34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35 * GNU General Public License for more details. 36 * 37 * You should have received a copy of the GNU General Public License 38 * along with this program. If not, see <http://www.gnu.org/licenses/>. 39 * 40 * The Original Code is BuckoFIBS, <http://www.buckosoft.com/BuckoFIBS/>. 41 * The Initial Developer of the Original Code is Dick Balaska and BuckoSoft, Corp. 42 * 43 */ 44 package com.buckosoft.fibs.BuckoFIBS.gui.boardTab.boardPane; 45 46 47 /** Tell the GUI (to tell the user) to "Please Move x pieces." 48 * @author Dick Balaska 49 * @since 2011/05/21 50 * @version $Revision$ <br> $Date$ 51 * @see <a href="http://cvs.buckosoft.com/Projects/BuckoFIBS/BuckoFIBS/src/main/java/com/buckosoft/fibs/BuckoFIBS/gui/boardTab/boardPane/AnimateEventCantMove.java">cvs AnimateEventPleaseMove.java</a> 52 */ 53 public class AnimateEventPleaseMove extends AnimateEvent { 54 private int[] dice = new int[2]; 55 private int checkersToMove; 56 57 @Override 58 public int getDuration() { 59 return 0; 60 } 61 62 @Override 63 public Type getType() { 64 return(Type.PleaseMove); 65 } 66 67 @Override 68 public boolean isGui() { 69 return true; 70 } 71 72 /** Only constructor */ 73 public AnimateEventPleaseMove() {} 74 75 /** 76 * @return the dice 77 */ 78 public int[] getDice() { 79 return dice; 80 } 81 82 /** Set the dice to be used in this move. 83 * Actually clones them, keeping with the design pattern of no overlapping objects from GameManagement to AnimationManagement. 84 * @param dice the dice to set 85 */ 86 public void setDice(int[] dice) { 87 this.dice[0] = dice[0]; 88 this.dice[1] = dice[1]; 89 } 90 91 /** 92 * @return the checkersToMove 93 */ 94 public int getCheckersToMove() { 95 return checkersToMove; 96 } 97 98 /** 99 * @param checkersToMove the checkersToMove to set 100 */ 101 public void setCheckersToMove(int checkersToMove) { 102 this.checkersToMove = checkersToMove; 103 } 104 105 106 }