package Ġpl uto . chess . move Ċ Ċ import Ġpl uto . chess . board . Board Ċ import Ġpl uto . chess . board . Field Ċ import Ġpl uto . chess . board . Flags Ċ import Ġpl uto . chess . board . Mask Ċ import Ġpl uto . chess . figure . Figure Color Ċ import Ġpl uto . chess . figure . Figure Type Ċ Ċ internal Ġclass ĠDefault Move ( figure Color : ĠFigure Color , Ġfigure Type : ĠFigure Type , Ġstart Field : ĠField , Ġtarget Field : ĠField ) Ġ: ĊĠĠĠ ĠMove ( figure Color , Ġfigure Type , Ġstart Field , Ġtarget Field ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġstart Clear Mask Ġ= Ġstart Field . to Mask (). inv () ĊĠĠĠ Ġprivate Ġval Ġtarget Insert Mask Ġ= Ġtarget Field . to Mask () ĊĠĠĠ Ġprivate Ġval Ġtarget Clear Mask Ġ= Ġtarget Field . to Mask (). inv () ĊĠĠĠ Ġprivate Ġval Ġclear Flags Ġ= Ġcalculate Clear Flags ( start Field , Ġtarget Field ) ĊĊĠĠĠ Ġoverride Ġfun Ġis Capt uring ( board : ĠBoard ) Ġ= Ġboard . is Figure On Field ( opp onent Color , Ġtarget Field ) ĊĊĠĠĠ Ġoverride Ġfun Ġis Not Blocked ( board : ĠBoard ) Ġ= Ġ! board . is Figure On Field ( figure Color , Ġtarget Field ) ĊĊĠĠĠ Ġoverride Ġfun Ġis Value Changing ( board : ĠBoard ) Ġ= Ġboard . is Figure On Field ( opp onent Color , Ġtarget Field ) ĊĊĠĠĠ Ġoverride Ġfun Ġmove ( color Masks : ĠArray < Mask >, Ġfigure Masks : ĠArray < Mask >, Ġflags F ifty Moves : ĠArray < Int >) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(( color Masks [ opp onent Color . ordinal ] Ġand Ġtarget Insert Mask ). isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcolor Masks [ opp onent Color . ordinal ] Ġ= Ġcolor Masks [ opp onent Color . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfigure Masks [ Figure Type . PA WN . ordinal ] Ġ= Ġfigure Masks [ Figure Type . PA WN . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfigure Masks [ Figure Type . KN IGHT . ordinal ] Ġ= Ġfigure Masks [ Figure Type . KN IGHT . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfigure Masks [ Figure Type . B ISH OP . ordinal ] Ġ= Ġfigure Masks [ Figure Type . B ISH OP . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfigure Masks [ Figure Type . RO OK . ordinal ] Ġ= Ġfigure Masks [ Figure Type . RO OK . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfigure Masks [ Figure Type . QUE EN . ordinal ] Ġ= Ġfigure Masks [ Figure Type . QUE EN . ordinal ] Ġand Ġtarget Clear Mask ĊĠĠĠĠĠĠĠĠĠĠĠ Ġflags F ifty Moves [ 1 ] Ġ= Ġ 0 ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ++ flags F ifty Moves [ 1 ] ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġcolor Masks [ figure Color . ordinal ] Ġ= Ġ( color Masks [ figure Color . ordinal ] Ġand Ġstart Clear Mask ) Ġor Ġtarget Insert Mask ĊĠĠĠĠĠĠĠ Ġfigure Masks [ figure Type . ordinal ] Ġ= Ġ( figure Masks [ figure Type . ordinal ] Ġand Ġstart Clear Mask ) Ġor Ġtarget Insert Mask ĊĠĠĠĠĠĠĠ Ġflags F ifty Moves [ 0 ] Ġ= Ġflags F ifty Moves [ 0 ] Ġand Ġclear Flags ĊĠĠĠ Ġ} ĊĠĠĠ Ġ}