View Javadoc
1   /******************************************************************************
2    * AnimateEventAcceptAndWin -  A Player accepts the resign offer.
3    * $Id$
4    * 
5    * BuckoFIBS - Backgammon by BuckoSoft
6    * Copyright© 2011 - Dick Balaska - BuckoSoft, Corp.
7    * 
8    * $Log$
9    * Revision 1.1  2011/06/05 06:54:39  dick
10   * A Player has accepted the resign offer.
11   *
12   */
13  
14  /* 
15   * This program is free software: you can redistribute it and/or modify
16   * it under the terms of the GNU General Public License as published by
17   * the Free Software Foundation, either version 3 of the License, or
18   * (at your option) any later version.
19   *
20   * This program is distributed in the hope that it will be useful,
21   * but WITHOUT ANY WARRANTY; without even the implied warranty of
22   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23   * GNU General Public License for more details.
24   *
25   * You should have received a copy of the GNU General Public License
26   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
27   *
28   * The Original Code is BuckoFIBS, <http://www.buckosoft.com/BuckoFIBS/>.
29   * The Initial Developer of the Original Code is Dick Balaska and BuckoSoft, Corp.
30   * 
31   */
32  package com.buckosoft.fibs.BuckoFIBS.gui.boardTab.boardPane;
33  
34  
35  /** A Player has accepted the resign offer.  "<code>dickbalaska accepts and wins 3 points.</code>"
36   * @author Dick Balaska
37   * @since 2011/06/04
38   * @version $Revision$ <br> $Date$
39   * @see <a href="http://cvs.buckosoft.com/Projects/BuckoFIBS/BuckoFIBS/src/main/java/com/buckosoft/fibs/BuckoFIBS/gui/boardTab/boardPane/AnimateEventAcceptAndWin.java">cvs AnimateEventAcceptAndWin.java</a>
40   */
41  public class AnimateEventAcceptAndWin extends AnimateEventResign {
42  	// size of the original icon
43  //	private	final static int	checkWidth = 217;
44  //	private final static int	checkHeight = 250;
45  	
46  
47  	@Override
48  	public int getDuration() {
49  		return 500;
50  	}
51  
52  	@Override
53  	public Type getType() {
54  		return(Type.AcceptAndWin);
55  	}
56  
57  	@Override
58  	public boolean isGui() {
59  		return false;
60  	}
61  
62  	/** Only constructor */
63  	public AnimateEventAcceptAndWin() {
64  		offset = 0.0;
65  	}
66  
67  	/** Set the start and end points for this dice animation
68  	 * @param miniX
69  	 * @param miniY
70  	 * @param miniSize
71  	 * @param x
72  	 * @param y
73  	 * @param flagSize
74  	 * @return int[0]=X, [1]=Y, [2]=WIDTH, [3]=HEIGHT
75  	 */
76  	@Override
77  	public int[] getFlagParms(int miniX, int miniY, int miniSize, int x, int y, int flagSize) {
78  		double realOffset = this.offset;
79  		this.offset = 1.0;
80  		int[] i = super.getFlagParms(miniX, miniY, miniSize, x, y, flagSize);
81  		this.offset = realOffset;
82  		return(i);
83  	}
84  }