Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 273526 | Differences between
and this patch

Collapse All | Expand All

(-)hexxagon-1.0-orig/src/libhexx/bitboard64.h (-7 / +5 lines)
Lines 19-30 Link Here
19
 * 
19
 * 
20
 */
20
 */
21
21
22
23
#ifndef _BITBOARD64_H
22
#ifndef _BITBOARD64_H
24
#define _BITBOARD64_H
23
#define _BITBOARD64_H
25
24
26
#include <netinet/in.h>
25
#include <netinet/in.h>
27
#include <iostream>
26
#include <iostream>
27
#include <cstdio>
28
28
29
namespace libhexx 
29
namespace libhexx 
30
{
30
{
Lines 54-67 Link Here
54
        {
54
        {
55
            printf("0x%X, 0x%X\n", lowbits, highbits);
55
            printf("0x%X, 0x%X\n", lowbits, highbits);
56
        };
56
        };
57
        
57
58
        friend std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b);
59
		friend std::istream& operator>>(std::istream &input, class BitBoard64 &b);
60
		
61
	private:
62
		
63
		uint32_t lowbits, highbits;
58
		uint32_t lowbits, highbits;
64
	};
59
	};
60
	
61
	std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b);
62
	std::istream& operator>>(std::istream &input, class BitBoard64 &b);
65
}
63
}
66
64
67
#endif
65
#endif
(-)hexxagon-1.0-orig/src/libhexx/board.h (-2 / +18 lines)
Lines 33-40 Link Here
33
33
34
namespace libhexx 
34
namespace libhexx 
35
{
35
{
36
    class Move;
36
#ifndef _MOVE_DEFINED
37
    class MoveList;
37
#define _MOVE_DEFINED
38
	class Move
39
	{
40
		public:
41
            Move();
42
            Move(int t);
43
            Move(int f, int t);
44
45
            operator bool() const;
46
            
47
            char from, to;
48
            int score;
49
	};
50
51
    bool scoreMoves(std::vector<Move> &moves, class Board board,
52
		const LookUp& lookUp, int depth, bool (*callback)(), int maxtime);
53
#endif
38
54
39
    enum 
55
    enum 
40
    {
56
    {
(-)hexxagon-1.0-orig/src/libhexx/libhexx.h (-2 / +1 lines)
Lines 19-29 Link Here
19
 * 
19
 * 
20
 */
20
 */
21
21
22
23
#include "bitboard64.h"
22
#include "bitboard64.h"
23
#include "lookup.h"
24
#include "move.h"
24
#include "move.h"
25
#include "board.h"
25
#include "board.h"
26
#include "game.h"
26
#include "game.h"
27
#include "lookup.h"
28
#include "view.h"
27
#include "view.h"
29
#include "layout.h"
28
#include "layout.h"
(-)hexxagon-1.0-orig/src/libhexx/lookup.h (+2 lines)
Lines 27-32 Link Here
27
27
28
namespace libhexx
28
namespace libhexx
29
{
29
{
30
	class BitBoard64;
31
30
	int getHexxagonIndex(int x, int y);
32
	int getHexxagonIndex(int x, int y);
31
33
32
	class LookUp
34
	class LookUp
(-)hexxagon-1.0-orig/src/libhexx/move.cpp (-1 / +8 lines)
Lines 114-117 Link Here
114
    return true;
114
    return true;
115
}
115
}
116
116
117
117
Move::Move() { from = 99; to = 99;};
118
Move::Move(int t) { from = t; to = t; };
119
Move::Move(int f, int t) { from = f; to = t; };
120
          
121
Move::operator bool() const
122
{
123
	return from != 99 && to != 99;
124
}
(-)hexxagon-1.0-orig/src/libhexx/move.h (-6 / +9 lines)
Lines 23-41 Link Here
23
#ifndef _MOVE_H
23
#ifndef _MOVE_H
24
#define _MOVE_H
24
#define _MOVE_H
25
25
26
#include "board.h"
27
28
#include <list>
26
#include <list>
29
#include <vector>
27
#include <vector>
30
28
31
namespace libhexx 
29
namespace libhexx 
32
{
30
{
31
	class Board;
32
	
33
#ifndef _MOVE_DEFINED
34
#define _MOVE_DEFINED
33
    class Move
35
    class Move
34
    {
36
    {
35
        public:
37
        public:
36
            Move() { from = 99; to = 99;};
38
            Move();
37
            Move(int t) { from = t; to = t; };
39
            Move(int t);
38
            Move(int f, int t) { from = f; to = t; };
40
            Move(int f, int t);
39
41
40
            inline bool operator<(const Move &r) const
42
            inline bool operator<(const Move &r) const
41
            {
43
            {
Lines 47-59 Link Here
47
                return (score != r.score);
49
                return (score != r.score);
48
            };
50
            };
49
          
51
          
50
            operator bool() const { return from != 99 && to != 99; };
52
            operator bool() const;
51
            
53
            
52
            char from, to;
54
            char from, to;
53
            int score;
55
            int score;
54
    };
56
    };
55
    
57
    
56
    bool scoreMoves(std::vector<Move> &moves, class Board board, const LookUp& lookUp, int depth, bool (*callback)(), int maxtime);
58
    bool scoreMoves(std::vector<Move> &moves, class Board board, const LookUp& lookUp, int depth, bool (*callback)(), int maxtime);
59
#endif
57
} //namespace libhexx
60
} //namespace libhexx
58
61
59
#endif // _HEXXAGONMOVE_H
62
#endif // _HEXXAGONMOVE_H

Return to bug 273526