
If display problem, please tell me the OS version.
Code: Select all
h = 3 * DesktopHeight(winB + ExamineDesktops() * 0) / 4
winB = OpenWindow(#PB_Any, 0, 0, h, h, "Chess board", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
hb = h / 8
SetGadgetFont(#PB_Default, FontID(LoadFont(#PB_Any, "courier", hb / 2) ) )
For i = 0 To 63
x = i & 7
y = (i & 56) >> 3
StringGadget(i, x * hb, y * hb, hb, hb, Chr(32 + (9779 + ((($76232B >> (3 * x) & 7) * Bool(Not(y) Or Not(y - 7) ) ) | (Bool(Not(y - 1) Or Not(y - 6) ) * 6) ) ) * Bool((((y >> 2) ! (y >> 1)) & 1) ! 1) ) )
SetGadgetColor(i, #PB_Gadget_BackColor, RGB(108, 128, 108) + ((x & 1) ! (y & 1) ) * RGB(147, 64, 20) )
SetGadgetColor(i, #PB_Gadget_FrontColor, RGB(255, 255, 255) * Bool(y & 4) )
Next
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow