mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 01:50:36 +00:00
gobot:: ko rule checking
This commit is contained in:
parent
0167e284cc
commit
a830fa73b3
@ -361,6 +361,16 @@ void try_to_play(string s, int who) {
|
||||
if(current.taken[i] == 1-who && count_breath(i) == 0)
|
||||
dead_group(i);
|
||||
}
|
||||
|
||||
int steps = 0;
|
||||
for(int it=isize(history)-1; it>=0; it--) {
|
||||
steps++;
|
||||
if(history[it].taken == current.taken) {
|
||||
go_message("This position repeated " + its(steps) + " moves back. Say 'undo' to cancel this move");
|
||||
}
|
||||
if(history[it].captures[0] == 0 && history[it].captures[1] == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if(count_breath(pos) == 0) {
|
||||
current.taken[pos] = Free;
|
||||
|
Loading…
Reference in New Issue
Block a user