Merge branch 'main' of https://github.com/TiredWithJoy/pike
This commit is contained in:
@@ -5,9 +5,7 @@ Nonchalant fishing poker game
|
||||
|
||||
### What is pike
|
||||
|
||||
Pike is an exiting fishing extravaganza that mixes poker and fishing into a
|
||||
coherent experience that produces minutes of fun! This game is a simple-2D
|
||||
fishing-like.
|
||||
Pike is an dark super super serious game about infiltrating and beating the evil fish mob who have been terrorizing the city by beating them at their own game
|
||||
|
||||
### What inspired pike
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Hand :: struct {
|
||||
Determine the rank of the hand
|
||||
*/
|
||||
evaluate_hand :: proc(hand: Hand) -> int {
|
||||
toal:int
|
||||
total:int
|
||||
aces: [dynamic]int
|
||||
for x, i in hand {
|
||||
total = total + x.rank
|
||||
@@ -43,7 +43,7 @@ evaluate_hand :: proc(hand: Hand) -> int {
|
||||
Compare two hands and return true if the
|
||||
first one is better than the second one
|
||||
*/
|
||||
compare_hands :: proc(player: Hand, other: Hand) -> casino.Hand {
|
||||
compare_hands :: proc(player: Hand, other: Hand) -> casino.Outcome {
|
||||
if evaluate_hand(player) > evaluate_hand(other) {
|
||||
return .WIN
|
||||
}else if evaluate_hand(player) < evaluate_hand(other) {
|
||||
|
||||
@@ -23,7 +23,7 @@ Suit :: enum {
|
||||
/*
|
||||
Type representing hand comparison
|
||||
*/
|
||||
Hand :: enum {
|
||||
Outcome :: enum {
|
||||
WIN,
|
||||
LOSE,
|
||||
TIE,
|
||||
|
||||
Reference in New Issue
Block a user