root/test_board_searchline.c

Revision 106, 1.6 kB (checked in by ng, 5 years ago)

mise a jour licence

Line 
1 /***************************************************************************
2  *   This file is part of the 'gemmes' project                             *
3  *                                                                         *
4  *                                                                         *
5  *   Copyright (C) 2007 by                                                 *
6  *         GARCH Soufiane                                                  *
7  *         GUILLAUME Nicolas <ng@ngsoft-fr.com>                            *
8  *                                                                         *
9  *                                                                         *
10  *   This program is free software; you can redistribute it and/or modify  *
11  *   it under the terms of the GNU General Public License as published by  *
12  *   the Free Software Foundation; version 2 of the License only.          *
13  *   See the COPYING file.                                                 *
14  ***************************************************************************/
15
16
17 #include "gemmes.h"
18
19
20 int main()
21 {
22
23
24     randseq_t rs = randseq_new_from_str(
25         "FDGECECAADGECCDEAGDBGACFCCCCCCCCCCCBCFBCFGEDBFDEAEEDBEDEGDFBCBECGDABGFAEB"
26         );
27        
28     board_t b = board_new(8,8,rs);
29
30     board_print(b);
31
32     printf("%d\n", board_searchline(b,1,2,left) );
33     printf("%d\n", board_searchline(b,3,4,down) );
34     printf("%d\n", board_searchline(b,3,3,right) );
35
36
37     rs = randseq_new_from_str(
38         "FDGECECAADGECCDEAGDBGACFCCBCFBCF"
39         "GEDBFDEAEEDBEDEGDFBCBECGDABGFAEB"
40         );
41        
42     b = board_new(8,8,rs);
43
44     board_print(b);
45 }
Note: See TracBrowser for help on using the browser.