initial monopoly test
This commit is contained in:
43
games/monopoly/community_chest.h
Normal file
43
games/monopoly/community_chest.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef COMMUNITY_H
|
||||
#define COMMUNITY_H
|
||||
|
||||
typedef enum {
|
||||
COMMUNITY_ADVANCE,
|
||||
COMMUNITY_EARN,
|
||||
COMMUNITY_SPEND,
|
||||
COMMUNITY_EARN_EACH_PLAYER,
|
||||
COMMUNITY_JAIL,
|
||||
COMMUNITY_JAIL_FREE,
|
||||
COMMUNITY_REPAIRS
|
||||
} CommunityType;
|
||||
|
||||
typedef struct {
|
||||
const char* description;
|
||||
CommunityType type;
|
||||
int value; // Amount or position
|
||||
int value2; // Second repair cost (Hotels)
|
||||
} CommunityCard;
|
||||
|
||||
#define COMMUNITY_DECK_SIZE 17
|
||||
|
||||
static const CommunityCard COMMUNITY_DECK[COMMUNITY_DECK_SIZE] = {
|
||||
{"Advance to Go (Collect $200)", COMMUNITY_ADVANCE, 0, 0},
|
||||
{"Bank error in your favor – collect $75", COMMUNITY_EARN, 75, 0},
|
||||
{"Doctor's fees – Pay $50", COMMUNITY_SPEND, 50, 0},
|
||||
{"Get out of jail free", COMMUNITY_JAIL_FREE, 0, 0},
|
||||
{"Go to jail – Do not pass Go, do not collect $200", COMMUNITY_JAIL, 0, 0},
|
||||
{"It is your birthday - Collect $10 from each player", COMMUNITY_EARN_EACH_PLAYER, 10, 0},
|
||||
{"Grand Opera Night – collect $50 from every player", COMMUNITY_EARN_EACH_PLAYER, 50, 0},
|
||||
{"Income Tax refund – collect $20", COMMUNITY_EARN, 20, 0},
|
||||
{"Life Insurance Matures – collect $100", COMMUNITY_EARN, 100, 0},
|
||||
{"Pay Hospital Fees of $100", COMMUNITY_SPEND, 100, 0},
|
||||
{"Receive $25 Consultancy Fee", COMMUNITY_EARN, 25, 0},
|
||||
{"Pay School Fees of $50", COMMUNITY_SPEND, 50, 0},
|
||||
{"Street repairs – $40 per house, $115 per hotel", COMMUNITY_REPAIRS, 40, 115},
|
||||
{"Won second prize in a beauty contest – collect $10", COMMUNITY_EARN, 10, 0},
|
||||
{"You inherit $100", COMMUNITY_EARN, 100, 0},
|
||||
{"From sale of stock you get $50", COMMUNITY_EARN, 50, 0},
|
||||
{"Holiday Fund matures - Receive $100", COMMUNITY_EARN, 100, 0}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user