File: printMove.cc

package info (click to toggle)
libosl 0.8.0-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,328 kB
  • sloc: cpp: 114,345; ruby: 1,290; ansic: 915; makefile: 431; perl: 309; sh: 35
file content (35 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* printMove.cc
 */
#include "osl/basic_type.h"
#include "osl/csa.h"
#include <iostream>

bool csa_mode = false;
using namespace osl;
void show(int move)
{
    Move m = Move::makeDirect(move);
    if (csa_mode)
	std::cout << csa::show(m) << std::endl;
    else
	std::cout << m << std::endl;
}
int main()
{
    long long move;
    while (std::cin >> move)
    {
	int imove = move;
	if (imove == move) {
	    show(imove);
	} else {
	    std::cerr << (int)imove << "\n";
	    show(imove);
	    std::cerr << (int)(move>>32) << "\n";
	    show(move >> 32);
	}
    }
}


/* ------------------------------------------------------------------------- */