aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--randino.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/randino.cpp b/randino.cpp
index bb3d917..be5e0f3 100644
--- a/randino.cpp
+++ b/randino.cpp
@@ -66,8 +66,8 @@ public:
}
bool isvalid(Move mv){
int oldneuidx=neuidx;
- cerr<<"Called isvalid with move ";
- protocol_put_move(cerr,mv);
+ //cerr<<"Called isvalid with move ";
+ //protocol_put_move(cerr,mv);
//print();
if(!move(oldneuidx,mv.neudir)){
//undomove(oldneuidx,mv.neudir);
@@ -116,8 +116,8 @@ Move calculate_move(Board &bd){
m.from=fr;
m.dir=d;
if(bd.isvalid(m)){
- cerr<<"push: ";
- protocol_put_move(cerr,m);
+ //cerr<<"push: ";
+ //protocol_put_move(cerr,m);
poss.push_back(m);
}
}
@@ -138,6 +138,7 @@ Move protocol_get_move(void){
Move m;
char c=cin.peek();
if(c=='q'||c=='Q')exit(0);
+ cin>>m.neudir>>m.from>>m.dir;
if(should_flip_board){
m.neudir=flip_dir(m.neudir);
m.from=flip_index(m.from);
@@ -164,8 +165,8 @@ int main(void){
struct timeval tv;
gettimeofday(&tv,NULL);
cerr<<"seed="<<(1000000*tv.tv_sec+tv.tv_usec)<<endl;
- //srand(1000000*tv.tv_sec+tv.tv_usec);
- srand(1430075262226814);
+ srand(1000000*tv.tv_sec+tv.tv_usec);
+ //srand(1430075262226814);
getline(cin,line);
if(line=="go"){
should_flip_board=false;