You may not move your opponent's pieces.

Use your browser's BACK button to go back to the previous page, then reload if necessary.

For general reference, here is the complete list of moves:

1. p g7-g6

If this is your settings file, you may edit it at https://www.chessvariants.com/play/pbm/play.php?game=Chinese+Chess&settings=GB-set&submit=Edit

Here is a code listing:

   0 set g findpiece g spaces
   1 set G findpiece G spaces
   2 include xiangqi
   3 setflag rules
   4 sub postauto1
   5   if islower moved
   6     die You may not move your opponent's pieces.
   7   elseif isupper old
   8     die You may not capture your own pieces.
   9   elseif not fn moved origin dest
  10     die You may not move a moved from origin to dest
  11   endif
  12   if == moved G
  13     set G dest
  14   endif
  15   if sub checked #G
  16     die You may not move your General into check
  17   endif
  18 endsub
  19 sub postauto2
  20   if isupper moved
  21     die You may not move your opponent's pieces.
  22   elseif islower old
  23     die You may not capture your own pieces.
  24   elseif not fn moved origin dest
  25     die You may not move a moved from origin to dest
  26   endif
  27   if == moved g
  28     set g dest
  29   endif
  30   if sub checked #g
  31     die You may not move your General into check
  32   endif
  33 endsub
  34 moveindex 1
  35 MOVE: p g7-g6
  36 postauto1
  37 if sub stalemated #g
  38   if sub checked #g
  39     say Checkmate! Red has won!
  40   else
  41     say Stalemate! Red has won!
  42   endif
  43   won
  44 elseif sub checked #g
  45   say Check!
  46 endif
  47 end
  48 
  49 lib xiangqi
  50 setsystem maxmove 1
  51 ban commands allmoves
  52 allow moves 1 captures 1
  53 setflag d1 e1 f1 d2 e2 f2 e3 d3 f3 d8 e8 f8 d9 e9 f9 d10 e10 f10
  54 def N checktwostep #0 #1 0 1 1 1
  55 def P checkaleap #0 #1 -1 0 or checkaleap #0 #1 1 0 and > rank #0 4 or checkaleap #0 #1 0 1
  56 def R checkride #0 #1 0 1
  57 def E checktwostep #0 #1 1 1 1 1 and < rank #1 5
  58 def C cond cond empty #0 capture (not empty #1) (checkhop #0 #1 0 1) (checkride #0 #1 0 1) and #1
  59 def G checkride #0 #1 1 0 and == space #1 g or checkleap #0 #1 0 1 and flag #1
  60 def F checkleap #0 #1 1 1 and flag #1
  61 def n checktwostep #0 #1 0 1 1 1
  62 def p checkaleap #0 #1 -1 0 or checkaleap #0 #1 1 0 and < rank #0 5 or checkaleap #0 #1 0 -1
  63 def r checkride #0 #1 0 1
  64 def e checktwostep #0 #1 1 1 1 1 and > rank #1 4
  65 def c cond cond empty #0 capture (not empty #1) (checkhop #0 #1 0 1) (checkride #0 #1 0 1) and #1
  66 def g checkride #0 #1 1 0 and == space #1 G or checkleap #0 #1 0 1 and flag #1
  67 def f checkleap #0 #1 1 1 and flag #1
  68 sub checked general
  69   local piece from
  70   if isupper space #general
  71     def enemies onlylower
  72   else
  73     def enemies onlyupper
  74   endif
  75   for (from piece) fn enemies
  76     if fn #piece #from #general
  77       return true
  78     endif
  79   next
  80   return false
  81 endsub
  82 sub stalemated kingpos
  83   store
  84   local from piece to key lglmvs
  85   set lglmvs ()
  86   if isupper space #kingpos
  87     def friends onlyupper
  88     def nofriends noupper
  89     def friend isupper #0
  90   else
  91     def friends onlylower
  92     def nofriends nolower
  93     def friend islower #0
  94   endif
  95   set royal space var kingpos
  96   store
  97   for to fn join #royal L #kingpos
  98     if fn #royal #kingpos #to and not fn friend space #to and onboard #to
  99       move #kingpos #to
 100       set incheck sub checked #to
 101       restore
 102       if not #incheck
 103         setlegal #kingpos #to
 104       endif
 105     endif
 106   next
 107   restore
 108   for (from piece) fn friends
 109     if == #from #kingpos
 110       continue
 111     endif
 112     for to fn join #piece L #from
 113       if fn #piece #from #to and not fn friend space #to and onboard #to
 114         move #from #to
 115         set incheck sub checked #kingpos
 116         restore
 117         if not #incheck
 118           setlegal #from #to
 119         endif
 120       endif
 121     next
 122   next
 123   return cond count system legalmoves false true
 124 endsub
 125 def PL leaps #0 1 0
 126 def EL leaps #0 2 2
 127 def RL rays #0 1 0
 128 def CL rays #0 1 0
 129 def GL merge leaps #0 1 0 (#g #G)
 130 def FL leaps #0 1 1
 131 def NL leaps #0 1 2
 132 def pL leaps #0 -1 0
 133 def eL leaps #0 2 2
 134 def rL rays #0 1 0
 135 def cL rays #0 1 0
 136 def gL merge leaps #0 1 0 (#G #g)
 137 def fL leaps #0 1 1
 138 def nL leaps #0 1 2
 139 endlib