-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kyle Troutner
committed
Oct 25, 2013
0 parents
commit 6505197
Showing
43 changed files
with
4,232 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
|
Oops, something went wrong.