@ -718,7 +718,9 @@ my ($pval, $called_player, $reason, $session) = @_; # Arguments: (Value of all p
}
subPROGRAM{
if(!defined($user_mode{$_[2]})){# Default user mode.
$user_mode{$_[2]}=0;
}
# if (!defined($user_mode)) {
# print 'Please input your side:', "\n";
# foreach (@player) {
@ -742,7 +744,7 @@ $user_mode{$_[2]} = 0;
# }
# MATCH: while (1) {
my%diff;
my(%diff,$onlykingcanmove);
$player_turn{$_[2]}++;
# $player = ($player_turn+1) % 2;
@ -823,21 +825,25 @@ $user_mode{$_[2]} = 0;
if($matches==0){
$counter{$_[2]}++;
if($counter{$_[2]}>=2&&$player_turn{$_[2]}>24){# End the game if the same applies to the opponent (only the king can move), and $player_turn have passed.
$onlykingcanmove=0;
# @{$diff{'msg'}{'gstatus'}}[$player] = 'Only the kings can act. Stalemate...';
push@{$diff{$pplayer[$player]}{'status'}},4;
if($player==1){# Undefine once, for the last player.
&POSTCHESS_CALC(&PRETTY_CALC(0,$player),0,$_[2]);
}
# return;
}
}
if($player_turn{$_[2]}>=$action_limit){# TODO: Is this needed when we have @pseudoinfinite_loop_check?
if(!(defined($onlykingcanmove))&&$player_turn{$_[2]}>=$action_limit){# TODO: Is this needed when we have @pseudoinfinite_loop_check?
if($player==1){# Undefine once, for the last player.
&POSTCHESS_CALC(&PRETTY_CALC(0,$player),0,$_[2]);
}
# return;
}
if(($player_turn{$_[2]}*2+$player)%($loop_limit+1)==0){# When player 0 is iterating through all chess possibilities in training mode, stop & do the usual decrement when both players have been doing the same four-turn loop at least three times successively. If we don't stop the program here but do stop the four-turn loop, player 1 might prioritize creating loops when breaking the loop would be a final blow for player 0. TODO: Alternatively, we might revert back here to some previous state...
elsif(($player_turn{$_[2]}*2+$player)%($loop_limit+1)==0){# When player 0 is iterating through all chess possibilities in training mode, stop & do the usual decrement when both players have been doing the same four-turn loop at least three times successively. If we don't stop the program here but do stop the four-turn loop, player 1 might prioritize creating loops when breaking the loop would be a final blow for player 0. TODO: Alternatively, we might revert back here to some previous state...
flex-flow:column-reverse;/* Order depends on player side #1/3 */
padding-left:24px;
max-inline-size:75vh;/* TODO: We don't use SVG for the chess pieces, so it might look pixelated on high-res. Wouldn't it be better to have a resizeable board? */
max-inline-size:356px;/* TODO: We don't use SVG for the chess pieces, so it might look pixelated on high-res. Wouldn't it be better to have a resizeable board? */
min-width:178px;/* From this point onward the item list font size will be too large */
/* From this point onward the pieces will seem pixelated */
background-color:peru;
/*! margin-left: 24px; */
box-shadow:10px10px20px10px;
}
.x-row{
display:flex;
flex-flow:rownowrap;/* Order depends on player side #2/3 */
padding-left:32px;
padding-left:0;
/*! min-width: 140px; */
}
#y-co>li{
flex:1;
border-left-style:ridge;
}
#y-co>li:nth-child(2n)>.x-row>li:nth-child(2n){
@ -56,21 +93,25 @@
/*}*/
#y-co:not(.x-row){
border-style:solid;
border-style:groove;
border-width:thick;
border-color:tan;
}
#x-co{
display:flex;
padding-top:1em;
/*! padding-top: 1em; */
flex-flow:rownowrap;
list-style-position:inside;
list-style-type:upper-alpha;
padding-left:32px;
padding-left:0px;
height:24px;
border-top-style:ridge;
}
#x-co>li{
flex:1132px;
padding-top:1em;
padding-top:0.4em;
}
img{
@ -111,6 +152,7 @@ figure {
display:flex;
flex-flow:row;
margin:05px05px;
border-radius:5%;
}
figureimg{
@ -145,16 +187,19 @@ dd.noimg { /* Display text of <dd> and <dt> at the same height when there's no i
}
.features>li{
padding:10px;
flex:01auto;
flex:1189px;
border-left-style:solid;
border-color:white;
}
.features{
display:flex;
flex-flow:rowwrap;
background-color:#5583;
background-color:#123;
font-weight:bold;
font-family:sans-serif;
text-align:center;
box-shadow:inset10px20px10px#345;
}
.keys{
@ -191,6 +236,8 @@ ul.features > li:hover > ul > li {