Various changes for style, changes to Card recommended by Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3136 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: OrientableImageSprite.java,v 1.1 2004/10/13 02:03:44 andrzej Exp $
|
// $Id: OrientableImageSprite.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -21,9 +21,11 @@
|
|||||||
|
|
||||||
package com.threerings.media.sprite;
|
package com.threerings.media.sprite;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
|
||||||
import java.awt.geom.*;
|
import java.awt.geom.AffineTransform;
|
||||||
|
import java.awt.geom.Area;
|
||||||
|
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
|
|
||||||
@@ -180,8 +182,7 @@ public class OrientableImageSprite extends ImageSprite
|
|||||||
|
|
||||||
graphics.transform(getRotationTransform());
|
graphics.transform(getRotationTransform());
|
||||||
|
|
||||||
if(_frames != null)
|
if(_frames != null) {
|
||||||
{
|
|
||||||
_frames.paintFrame(
|
_frames.paintFrame(
|
||||||
graphics,
|
graphics,
|
||||||
_frameIdx,
|
_frameIdx,
|
||||||
@@ -189,8 +190,7 @@ public class OrientableImageSprite extends ImageSprite
|
|||||||
_oy - _oyoff
|
_oy - _oyoff
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
super.paint(graphics);
|
super.paint(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CardGameController.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: CardGameController.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CardPanel.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: CardPanel.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -52,18 +52,18 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
/** Calls CardSpriteObserver.cardSpriteClicked. */
|
/** Calls CardSpriteObserver.cardSpriteClicked. */
|
||||||
protected static class CardSpriteClickedOp implements ObserverList.ObserverOp
|
protected static class CardSpriteClickedOp implements ObserverList.ObserverOp
|
||||||
{
|
{
|
||||||
protected CardSprite sprite;
|
protected CardSprite _sprite;
|
||||||
protected MouseEvent me;
|
protected MouseEvent _me;
|
||||||
|
|
||||||
public CardSpriteClickedOp (CardSprite sprite, MouseEvent me)
|
public CardSpriteClickedOp (CardSprite sprite, MouseEvent me)
|
||||||
{
|
{
|
||||||
this.sprite = sprite;
|
_sprite = sprite;
|
||||||
this.me = me;
|
_me = me;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean apply (Object observer)
|
public boolean apply (Object observer)
|
||||||
{
|
{
|
||||||
((CardSpriteObserver)observer).cardSpriteClicked(sprite, me);
|
((CardSpriteObserver)observer).cardSpriteClicked(_sprite, _me);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,18 +71,18 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
/** Calls CardSpriteObserver.cardSpriteDragged. */
|
/** Calls CardSpriteObserver.cardSpriteDragged. */
|
||||||
protected static class CardSpriteDraggedOp implements ObserverList.ObserverOp
|
protected static class CardSpriteDraggedOp implements ObserverList.ObserverOp
|
||||||
{
|
{
|
||||||
protected CardSprite sprite;
|
protected CardSprite _sprite;
|
||||||
protected MouseEvent me;
|
protected MouseEvent _me;
|
||||||
|
|
||||||
public CardSpriteDraggedOp (CardSprite sprite, MouseEvent me)
|
public CardSpriteDraggedOp (CardSprite sprite, MouseEvent me)
|
||||||
{
|
{
|
||||||
this.sprite = sprite;
|
_sprite = sprite;
|
||||||
this.me = me;
|
_me = me;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean apply (Object observer)
|
public boolean apply (Object observer)
|
||||||
{
|
{
|
||||||
((CardSpriteObserver)observer).cardSpriteDragged(sprite, me);
|
((CardSpriteObserver)observer).cardSpriteDragged(_sprite, _me);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,38 +128,38 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activeCardSprite = highestSprite;
|
_activeCardSprite = highestSprite;
|
||||||
|
|
||||||
if(activeCardSprite != null)
|
if(_activeCardSprite != null)
|
||||||
{
|
{
|
||||||
handleX = activeCardSprite.getX() - me.getX();
|
_handleX = _activeCardSprite.getX() - me.getX();
|
||||||
handleY = activeCardSprite.getY() - me.getY();
|
_handleY = _activeCardSprite.getY() - me.getY();
|
||||||
|
|
||||||
hasBeenDragged = false;
|
_hasBeenDragged = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
activeCardSprite = null;
|
_activeCardSprite = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseReleased (MouseEvent me)
|
public void mouseReleased (MouseEvent me)
|
||||||
{
|
{
|
||||||
if(activeCardSprite != null && hasBeenDragged)
|
if(_activeCardSprite != null && _hasBeenDragged)
|
||||||
{
|
{
|
||||||
activeCardSprite.queueNotification(
|
_activeCardSprite.queueNotification(
|
||||||
new CardSpriteDraggedOp(activeCardSprite, me)
|
new CardSpriteDraggedOp(_activeCardSprite, me)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseClicked (MouseEvent me)
|
public void mouseClicked (MouseEvent me)
|
||||||
{
|
{
|
||||||
if(activeCardSprite != null)
|
if(_activeCardSprite != null)
|
||||||
{
|
{
|
||||||
activeCardSprite.queueNotification(
|
_activeCardSprite.queueNotification(
|
||||||
new CardSpriteClickedOp(activeCardSprite, me)
|
new CardSpriteClickedOp(_activeCardSprite, me)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,15 +171,15 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
{
|
{
|
||||||
public void mouseDragged (MouseEvent me)
|
public void mouseDragged (MouseEvent me)
|
||||||
{
|
{
|
||||||
if(activeCardSprite != null &&
|
if(_activeCardSprite != null &&
|
||||||
activeCardSprite.isDraggable())
|
_activeCardSprite.isDraggable())
|
||||||
{
|
{
|
||||||
activeCardSprite.setLocation(
|
_activeCardSprite.setLocation(
|
||||||
me.getX() + handleX,
|
me.getX() + _handleX,
|
||||||
me.getY() + handleY
|
me.getY() + _handleY
|
||||||
);
|
);
|
||||||
|
|
||||||
hasBeenDragged = true;
|
_hasBeenDragged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,11 +203,11 @@ public abstract class CardPanel extends VirtualMediaPanel
|
|||||||
|
|
||||||
|
|
||||||
/** The last card sprite pressed. */
|
/** The last card sprite pressed. */
|
||||||
private CardSprite activeCardSprite;
|
protected CardSprite _activeCardSprite;
|
||||||
|
|
||||||
/** The location of the cursor in the active sprite. */
|
/** The location of the cursor in the active sprite. */
|
||||||
private int handleX, handleY;
|
protected int _handleX, _handleY;
|
||||||
|
|
||||||
/** Whether or not the active sprite has been dragged. */
|
/** Whether or not the active sprite has been dragged. */
|
||||||
private boolean hasBeenDragged;
|
protected boolean _hasBeenDragged;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CardSprite.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: CardSprite.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -32,19 +32,6 @@ import com.threerings.parlor.card.data.Card;
|
|||||||
*/
|
*/
|
||||||
public class CardSprite extends OrientableImageSprite
|
public class CardSprite extends OrientableImageSprite
|
||||||
{
|
{
|
||||||
/** The panel responsible for the sprite. */
|
|
||||||
protected CardPanel _panel;
|
|
||||||
|
|
||||||
/** The depicted card. */
|
|
||||||
protected Card _card;
|
|
||||||
|
|
||||||
/** Whether or not the card is facing up. */
|
|
||||||
protected boolean _facingUp;
|
|
||||||
|
|
||||||
/** Whether or not the user can drag the card around the board. */
|
|
||||||
protected boolean _draggable;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new upward-facing card sprite.
|
* Creates a new upward-facing card sprite.
|
||||||
*
|
*
|
||||||
@@ -147,4 +134,17 @@ public class CardSprite extends OrientableImageSprite
|
|||||||
{
|
{
|
||||||
setMirage(_facingUp ? _panel.getCardImage(_card) : _panel.getCardBackImage());
|
setMirage(_facingUp ? _panel.getCardImage(_card) : _panel.getCardBackImage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** The panel responsible for the sprite. */
|
||||||
|
protected CardPanel _panel;
|
||||||
|
|
||||||
|
/** The depicted card. */
|
||||||
|
protected Card _card;
|
||||||
|
|
||||||
|
/** Whether or not the card is facing up. */
|
||||||
|
protected boolean _facingUp;
|
||||||
|
|
||||||
|
/** Whether or not the user can drag the card around the board. */
|
||||||
|
protected boolean _draggable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CardSpriteObserver.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: CardSpriteObserver.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
package com.threerings.parlor.card.client;
|
package com.threerings.parlor.card.client;
|
||||||
|
|
||||||
import java.awt.event.*;
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Observer interface for (draggable) card sprites.
|
* Observer interface for (draggable) card sprites.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Card.java,v 1.2 2004/10/13 19:29:12 andrzej Exp $
|
// $Id: Card.java,v 1.3 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -49,7 +49,7 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public int getNumber ()
|
public int getNumber ()
|
||||||
{
|
{
|
||||||
return number;
|
return (_value >> 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,7 +60,7 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public int getSuit ()
|
public int getSuit ()
|
||||||
{
|
{
|
||||||
return suit;
|
return (_value & 0x03);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,6 +70,8 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public boolean isNumber ()
|
public boolean isNumber ()
|
||||||
{
|
{
|
||||||
|
int number = getNumber();
|
||||||
|
|
||||||
return number >= 2 && number <= 10;
|
return number >= 2 && number <= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,6 +82,8 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public boolean isFace ()
|
public boolean isFace ()
|
||||||
{
|
{
|
||||||
|
int number = getNumber();
|
||||||
|
|
||||||
return number == KING || number == QUEEN || number == JACK;
|
return number == KING || number == QUEEN || number == JACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +94,7 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public boolean isAce ()
|
public boolean isAce ()
|
||||||
{
|
{
|
||||||
return number == ACE;
|
return getNumber() == ACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,7 +104,7 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public boolean isJoker ()
|
public boolean isJoker ()
|
||||||
{
|
{
|
||||||
return number == JOKER;
|
return getNumber() == JOKER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,46 +115,22 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public boolean isValid ()
|
public boolean isValid ()
|
||||||
{
|
{
|
||||||
|
int number = getNumber(), suit = getSuit();
|
||||||
|
|
||||||
return number == JOKER ||
|
return number == JOKER ||
|
||||||
(number >= 2 && number <= ACE &&
|
(number >= 2 && number <= ACE &&
|
||||||
suit >= HEARTS && suit <= SPADES);
|
suit >= HEARTS && suit <= SPADES);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Documentation inherited.
|
||||||
* Writes this object to the specified output stream.
|
|
||||||
*
|
|
||||||
* @param oos the output stream
|
|
||||||
*/
|
|
||||||
public void writeObject(ObjectOutputStream oos)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
oos.defaultWriteObject();
|
|
||||||
|
|
||||||
oos.writeInt(number);
|
|
||||||
oos.writeInt(suit);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads this object from the specified input stream.
|
|
||||||
*
|
|
||||||
* @param ois the input stream
|
|
||||||
*/
|
|
||||||
public void readObject(ObjectInputStream ois)
|
|
||||||
throws IOException,
|
|
||||||
ClassNotFoundException
|
|
||||||
{
|
|
||||||
ois.defaultReadObject();
|
|
||||||
|
|
||||||
number = ois.readInt();
|
|
||||||
suit = ois.readInt();
|
|
||||||
|
|
||||||
key = new Integer((number << 2) | suit);
|
|
||||||
}
|
|
||||||
|
|
||||||
// documentation inherited
|
|
||||||
public Comparable getKey ()
|
public Comparable getKey ()
|
||||||
{
|
{
|
||||||
return key;
|
if(_key == null)
|
||||||
|
{
|
||||||
|
_key = new Byte(_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -160,7 +140,7 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public int hashCode ()
|
public int hashCode ()
|
||||||
{
|
{
|
||||||
return key.intValue();
|
return _value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,8 +153,7 @@ public class Card implements CardCodes,
|
|||||||
{
|
{
|
||||||
if(other instanceof Card)
|
if(other instanceof Card)
|
||||||
{
|
{
|
||||||
return number == ((Card)other).number &&
|
return _value == ((Card)other)._value;
|
||||||
suit == ((Card)other).suit;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -182,52 +161,6 @@ public class Card implements CardCodes,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string representation of a given number.
|
|
||||||
*
|
|
||||||
* @param number the number to represent
|
|
||||||
* @return the string representation
|
|
||||||
*/
|
|
||||||
public static String numberToString(int number)
|
|
||||||
{
|
|
||||||
switch(number)
|
|
||||||
{
|
|
||||||
case 2: return "Two";
|
|
||||||
case 3: return "Three";
|
|
||||||
case 4: return "Four";
|
|
||||||
case 5: return "Five";
|
|
||||||
case 6: return "Six";
|
|
||||||
case 7: return "Seven";
|
|
||||||
case 8: return "Eight";
|
|
||||||
case 9: return "Nine";
|
|
||||||
case 10: return "Ten";
|
|
||||||
case JACK: return "Jack";
|
|
||||||
case QUEEN: return "Queen";
|
|
||||||
case KING: return "King";
|
|
||||||
case ACE: return "Ace";
|
|
||||||
case JOKER: return "Joker";
|
|
||||||
default: return "???";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string representation of a particular suit.
|
|
||||||
*
|
|
||||||
* @param suit the suit to represent
|
|
||||||
* @return the string representation
|
|
||||||
*/
|
|
||||||
public static String suitToString(int suit)
|
|
||||||
{
|
|
||||||
switch(suit)
|
|
||||||
{
|
|
||||||
case HEARTS: return "Hearts";
|
|
||||||
case DIAMONDS: return "Diamonds";
|
|
||||||
case CLUBS: return "Clubs";
|
|
||||||
case SPADES: return "Spades";
|
|
||||||
default: return "???";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string representation of this card.
|
* Returns a string representation of this card.
|
||||||
*
|
*
|
||||||
@@ -235,13 +168,43 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
|
int number = getNumber();
|
||||||
|
|
||||||
if(number == JOKER)
|
if(number == JOKER)
|
||||||
{
|
{
|
||||||
return "Joker";
|
return "Jk";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return numberToString(number) + " of " + suitToString(suit);
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
||||||
|
if(number >= 2 && number <= 9)
|
||||||
|
{
|
||||||
|
sb.append(Integer.toString(number));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch(number)
|
||||||
|
{
|
||||||
|
case 10: sb.append('T'); break;
|
||||||
|
case JACK: sb.append('J'); break;
|
||||||
|
case QUEEN: sb.append('Q'); break;
|
||||||
|
case KING: sb.append('K'); break;
|
||||||
|
case ACE: sb.append('A'); break;
|
||||||
|
default: sb.append('?'); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(getSuit())
|
||||||
|
{
|
||||||
|
case HEARTS: sb.append('h'); break;
|
||||||
|
case DIAMONDS: sb.append('d'); break;
|
||||||
|
case CLUBS: sb.append('c'); break;
|
||||||
|
case SPADES: sb.append('s'); break;
|
||||||
|
default: sb.append('?'); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,19 +216,13 @@ public class Card implements CardCodes,
|
|||||||
*/
|
*/
|
||||||
Card (int number, int suit)
|
Card (int number, int suit)
|
||||||
{
|
{
|
||||||
this.number = number;
|
_value = (byte)((number << 2) | suit);
|
||||||
this.suit = suit;
|
|
||||||
|
|
||||||
key = new Integer((number << 2) | suit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** The number of the card. */
|
/** The number of the card. */
|
||||||
private int number;
|
protected byte _value;
|
||||||
|
|
||||||
/** The suit of the card. */
|
|
||||||
private int suit;
|
|
||||||
|
|
||||||
/** The comparison key. */
|
/** The comparison key. */
|
||||||
private Integer key;
|
protected transient Byte _key;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Deck.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: Deck.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Hand.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: Hand.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
package com.threerings.parlor.card.data;
|
package com.threerings.parlor.card.data;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import com.threerings.io.Streamable;
|
import com.threerings.io.Streamable;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CardGameManager.java,v 1.2 2004/10/13 19:29:12 andrzej Exp $
|
// $Id: CardGameManager.java,v 1.3 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrickCardGameController.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: TrickCardGameController.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrickCardGameControllerDelegate.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: TrickCardGameControllerDelegate.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -31,10 +31,6 @@ import com.threerings.presents.dobj.AttributeChangedEvent;
|
|||||||
*/
|
*/
|
||||||
public class TrickCardGameControllerDelegate extends TurnGameControllerDelegate
|
public class TrickCardGameControllerDelegate extends TurnGameControllerDelegate
|
||||||
{
|
{
|
||||||
/** The trick card game controller. */
|
|
||||||
protected TrickCardGameController _tcgctrl;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
@@ -63,4 +59,8 @@ public class TrickCardGameControllerDelegate extends TurnGameControllerDelegate
|
|||||||
_tcgctrl.playingTrickDidChange(tcgObj.getPlayingTrick());
|
_tcgctrl.playingTrickDidChange(tcgObj.getPlayingTrick());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** The trick card game controller. */
|
||||||
|
protected TrickCardGameController _tcgctrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrickCardGameManager.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: TrickCardGameManager.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrickCardGameManagerDelegate.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: TrickCardGameManagerDelegate.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -33,13 +33,6 @@ import com.threerings.parlor.turn.TurnGameManagerDelegate;
|
|||||||
*/
|
*/
|
||||||
public class TrickCardGameManagerDelegate extends TurnGameManagerDelegate
|
public class TrickCardGameManagerDelegate extends TurnGameManagerDelegate
|
||||||
{
|
{
|
||||||
/** The trick card game manager. */
|
|
||||||
protected TrickCardGameManager _tcgmgr;
|
|
||||||
|
|
||||||
/** The game object. */
|
|
||||||
protected TrickCardGameObject _trickCardGame;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
@@ -129,4 +122,11 @@ public class TrickCardGameManagerDelegate extends TurnGameManagerDelegate
|
|||||||
|
|
||||||
_tcgmgr.trickDidEnd();
|
_tcgmgr.trickDidEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** The trick card game manager. */
|
||||||
|
protected TrickCardGameManager _tcgmgr;
|
||||||
|
|
||||||
|
/** The game object. */
|
||||||
|
protected TrickCardGameObject _trickCardGame;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TrickCardGameObject.java,v 1.1 2004/10/13 02:03:26 andrzej Exp $
|
// $Id: TrickCardGameObject.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
|
|||||||
Reference in New Issue
Block a user