View Javadoc
1   /******************************************************************************
2    * AnimateEventPleaseRollOrDouble.java - Tell the GUI (to tell the user) to "Please Accept or Reject Double."
3    * $Id$
4    * 
5    * BuckoFIBS - Backgammon by BuckoSoft
6    * Copyright© 2011 - Dick Balaska - BuckoSoft, Corp.
7    * 
8    * $Log$
9    * Revision 1.2  2011/06/02 19:13:34  dick
10   * Need to define isGui().
11   *
12   * Revision 1.1  2011/05/22 22:56:08  dick
13   * c.b.f.B.g.boardTab.board becomes c.b.f.B.g.boardTab.boardPane .
14   *
15   * Revision 1.1  2011/05/22 05:22:05  dick
16   * Tell the GUI (to tell the user) to "Please Roll or Double."
17   *
18   */
19  
20  /* 
21   * This program is free software: you can redistribute it and/or modify
22   * it under the terms of the GNU General Public License as published by
23   * the Free Software Foundation, either version 3 of the License, or
24   * (at your option) any later version.
25   *
26   * This program is distributed in the hope that it will be useful,
27   * but WITHOUT ANY WARRANTY; without even the implied warranty of
28   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29   * GNU General Public License for more details.
30   *
31   * You should have received a copy of the GNU General Public License
32   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
33   *
34   * The Original Code is BuckoFIBS, <http://www.buckosoft.com/BuckoFIBS/>.
35   * The Initial Developer of the Original Code is Dick Balaska and BuckoSoft, Corp.
36   * 
37   */
38  package com.buckosoft.fibs.BuckoFIBS.gui.boardTab.boardPane;
39  
40  import java.awt.Point;
41  
42  import com.buckosoft.fibs.domain.Board;
43  
44  
45  /** Tell the GUI (to tell the user) to "Please Accept or Reject Double."
46   * @author Dick Balaska
47   * @since 2011/05/21
48   * @version $Revision$ <br> $Date$
49   * @see <a href="http://cvs.buckosoft.com/Projects/BuckoFIBS/BuckoFIBS/src/main/java/com/buckosoft/fibs/BuckoFIBS/gui/boardTab/board/boardTab/boardPane/AnimateEventPleaseAcceptOrRejectDouble.java">cvs AnimateEventPleaseAcceptOrRejectDouble.java</a>
50   */
51  public class AnimateEventPleaseAcceptOrRejectDouble extends AnimateEventDouble {
52  	private boolean gui = true;
53  
54  	@Override
55  	public int getDuration() {
56  		return 0;
57  	}
58  
59  	@Override
60  	public Type getType() {
61  		return(Type.PleaseAcceptOrRejectDouble);
62  	}
63  
64  	@Override
65  	public boolean isGui() {
66  		return gui;
67  	}
68  
69  	public void setGui(boolean isGui) {
70  		this.gui = isGui;
71  	}
72  
73  	/** Only constructor */
74  	public AnimateEventPleaseAcceptOrRejectDouble() {}
75  
76  	@Override
77  	public void calculate(Board board) {
78  	}
79  
80  	@Override
81  	public int[] getXY(double offset) {
82  		Point p = getDoubleCubePushXY();
83  		int[] ii = new int[2];
84  		ii[0] = p.x;
85  		ii[1] = p.y;
86  		return ii;
87  	}
88  
89  }