Show message for special cases
This commit is contained in:
parent
41afbf956f
commit
e4e917ac48
14
game.c
14
game.c
@ -6,6 +6,7 @@
|
|||||||
#include "teyaku.h"
|
#include "teyaku.h"
|
||||||
#include "dekiyaku.h"
|
#include "dekiyaku.h"
|
||||||
#include "field_multiplier.h"
|
#include "field_multiplier.h"
|
||||||
|
#include "special_cases.h"
|
||||||
#include "play.h"
|
#include "play.h"
|
||||||
|
|
||||||
Vector2 mouse_pos;
|
Vector2 mouse_pos;
|
||||||
@ -314,6 +315,19 @@ void run_frame_left_from_deck(Game *g) {
|
|||||||
|
|
||||||
void run_frame_calculating_scores(Game *g) {
|
void run_frame_calculating_scores(Game *g) {
|
||||||
printf("Hand scores: %d %d %d\n", hand_points(&g->player_scored), hand_points(&g->right_scored), hand_points(&g->left_scored));
|
printf("Hand scores: %d %d %d\n", hand_points(&g->player_scored), hand_points(&g->right_scored), hand_points(&g->left_scored));
|
||||||
|
|
||||||
|
SpecialCase special_case = calculate_special_case(g);
|
||||||
|
switch(special_case.type) {
|
||||||
|
case SPECIAL_CASE_ALL_EIGHTS:
|
||||||
|
printf("All eights! Dealer gets %d kan\n", special_case.score);
|
||||||
|
break;
|
||||||
|
case SPECIAL_CASE_DOUBLE_EIGHTS:
|
||||||
|
printf("Double eights! Player %d gets %d kan\n", special_case.target, special_case.score);
|
||||||
|
break;
|
||||||
|
case SPECIAL_CASE_SIXTEEN_CHAFF:
|
||||||
|
printf("Sixteen chaff! Player %d gets %d kan\n", special_case.target, special_case.score);
|
||||||
|
break;
|
||||||
|
}
|
||||||
g->state = GAME_STATE_INITIALIZING;
|
g->state = GAME_STATE_INITIALIZING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user