]> Pileus Git - ~andy/spades/blobdiff - src/org/pileus/spades/Cards.java
Add Spades class and tie things together
[~andy/spades] / src / org / pileus / spades / Cards.java
index 9085a8f94c679347de34a1dca201f776975c04d5..e4c566e1afc4c5c60859de63c71821ee345f6894 100644 (file)
@@ -124,6 +124,7 @@ public class Cards extends GLSurfaceView implements GLSurfaceView.Renderer
        private Map<String,Integer> index; // card name to index map
 
        /* Properties */
+       public Spades        game;        // the spades game
        public String[]      hand;        // cards to display
        public String[]      pile;        // played cards to display
 
@@ -293,6 +294,7 @@ public class Cards extends GLSurfaceView implements GLSurfaceView.Renderer
                }
                if (y >= this.ylim && this.drag && up) {
                        //Os.debug("Cards: onTouchEvent - playing card");
+                       this.game.onPlay(this.hand[this.pick]);
                }
                if (up) {
                        //Os.debug("Cards: onTouchEvent - ending drag");