wok-6.x view foobillard/stuff/snooker_draw.patch @ rev 11226
Add from wok-undigest: nvclock ola ola-dev owfs oxine protobuf protobuf-dev
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 04 11:10:38 2011 +0100 (2011-11-04) |
parents | |
children |
line source
1 Index: src/evaluate_move.c
2 ===================================================================
3 --- src/evaluate_move.c (revision 6)
4 +++ src/evaluate_move.c (working copy)
5 @@ -602,6 +602,11 @@
6 player[act_player].winner=0;
7 player[other_player].winner=1;
8 }
9 + if(player[act_player].score==player[other_player].score) {
10 + player[act_player].winner=1;
11 + player[other_player].winner=1;
12 + }
13 +
14 }
16 printf("EVAL done\n");
17 Index: src/billard3d.c
18 ===================================================================
19 --- src/billard3d.c (revision 6)
20 +++ src/billard3d.c (working copy)
21 @@ -1760,8 +1760,17 @@
22 options_gamemode==options_gamemode_tournament &&
23 (player[0].winner || player[1].winner) )
24 {
25 - tournament_evaluate_last_match( &tournament_state );
26 - tournament_state.wait_for_next_match=1;
27 + if ( player[0].winner == player[1].winner )
28 + { // Draw
29 + restart_game_common();
30 + player[act_player].winner=0;
31 + player[other_player].winner=0;
32 + }
33 + else
34 + {
35 + tournament_evaluate_last_match( &tournament_state );
36 + tournament_state.wait_for_next_match=1;
37 + }
38 }
39 } else {
40 int old_cueball_ind;
41 @@ -3654,6 +3663,7 @@
42 create_walls( &walls );
43 create_scene( &balls );
44 g_shot_due=1;
45 + snooker_state.to_play=SN_PLAY_RED;
46 }