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/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/src/libhexx/board.h (-2 / +15 lines)
Lines 33-40 Link Here
33
33
34
namespace libhexx 
34
namespace libhexx 
35
{
35
{
36
    class Move;
36
	class Move
37
    class MoveList;
37
	{
38
		public:
39
            Move();
40
            Move(int t);
41
            Move(int f, int t);
42
43
            operator bool() const;
44
            
45
            char from, to;
46
            int score;
47
	};
48
49
    bool scoreMoves(std::vector<Move> &moves, class Board board,
50
		const LookUp& lookUp, int depth, bool (*callback)(), int maxtime);
38
51
39
    enum 
52
    enum 
40
    {
53
    {
(-)hexxagon-1.0/src/libhexx/libhexx.h (-1 lines)
Lines 19-25 Link Here
19
 * 
19
 * 
20
 */
20
 */
21
21
22
23
#include "bitboard64.h"
22
#include "bitboard64.h"
24
#include "move.h"
23
#include "move.h"
25
#include "board.h"
24
#include "board.h"
(-)hexxagon-1.0/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/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/src/libhexx/move.h (-6 / +6 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
    class Move
33
    class Move
34
    {
34
    {
35
        public:
35
        public:
36
            Move() { from = 99; to = 99;};
36
            Move();
37
            Move(int t) { from = t; to = t; };
37
            Move(int t);
38
            Move(int f, int t) { from = f; to = t; };
38
            Move(int f, int t);
39
39
40
            inline bool operator<(const Move &r) const
40
            inline bool operator<(const Move &r) const
41
            {
41
            {
Lines 47-53 Link Here
47
                return (score != r.score);
47
                return (score != r.score);
48
            };
48
            };
49
          
49
          
50
            operator bool() const { return from != 99 && to != 99; };
50
            operator bool() const;
51
            
51
            
52
            char from, to;
52
            char from, to;
53
            int score;
53
            int score;

Return to bug 273526