Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Troutner committed Oct 25, 2013
0 parents commit 6505197
Show file tree
Hide file tree
Showing 43 changed files with 4,232 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added Applications/.DS_Store
Binary file not shown.
Binary file added Applications/application.linux/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions Applications/application.linux/Golf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

APPDIR=$(dirname "$0")
java -Djava.library.path="$APPDIR" -cp "$APPDIR/lib/Golf.jar:$APPDIR/lib/core.jar" Golf
Binary file added Applications/application.linux/lib/Golf.jar
Binary file not shown.
Binary file added Applications/application.linux/lib/core.jar
Binary file not shown.
84 changes: 84 additions & 0 deletions Applications/application.linux/source/Card.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
class Card
{
int num, suite;
int x,y;
String me;
PImage img;
PImage face;
boolean playable;
public Card(int num, int suite, PImage img)
{
this.num = num;
this.suite = suite;
this.img= img;
this.face = img;
playable = false;
x = 50*num;
y = 100;
switch (num)
{
case 14:
this.num = 1;
me = "A";
break;
case 11:
me = "J";
break;
case 12:
me = "Q";
break;
case 13:
me = "K";
break;
default:
me = ""+num;
}

switch (suite)
{
case 1:
me += " Spade";
break;
case 2:
me += " Heart";
break;
case 3:
me += " Diamond";
break;
case 4:
me += " Clubs";
break;
}
}

public PImage getImg()
{
return img;
}

public void display()
{
image(img,x,y);
}

public String toString()
{
return me;
}

public boolean isPlayable()
{
return this.playable;
}

public void makePlayable()
{
this.playable = true;
}

public int getNum()
{
return num;
}
}

Loading

0 comments on commit 6505197

Please sign in to comment.