Select Git revision
-
Jens Bendisposto authoredJens Bendisposto authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
visb_sudoku.json 3.69 KiB
{
"svg":"SudokuFeld.svg",
"definitions":
[
{ "name":"BOARD",
"value" : "%x.(x:DOM|%y.(y:DOM|0) <+ Board(x))"
},
{ "name":"Won",
"value" : "bool(ENABLED(\"Solve\")=TRUE & Board : DOM --> (DOM --> RAN))"
}
],
"items": [
{
"for": {"from":1, "to":9},
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "txt_%0_%1",
"attr": "text",
"value" : "BOARD(%0)(%1)"
},
{
"for": {"from":1, "to":9},
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "txt_%0_%1",
"attr": "fill",
"value" : "IF %1:dom(PuzzleBoard(%0)) THEN \"black\" ELSE \"steelblue\" END"
},
{
"for": {"from":1, "to":9},
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "board_%0_%1",
"attr": "class",
"value" : "IF Won=TRUE THEN IF (%0+%1)mod 2 =0 THEN \"win\" ELSE \"win2\" END ELSIF curx=%0 & cury=%1 THEN \"selected\" ELSIF %0|->%1:conflict_pos(curx,cury) THEN IF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"wrong\" ELSE \"conflictpos\" END ELSIF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"samevalue\" ELSIF %1:dom(PuzzleBoard(%0)) THEN \"fixed\" ELSE \"normal\" END"
},
{
"for": {"from":1, "to":9},
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "txt_%0_%1",
"attr": "visibility",
"value" : "IF %1 : dom(Board(%0)) THEN \"visible\" ELSE \"hidden\" END"
},
{
"for": {"from":1, "to":9},
"id": "TipFrame_%0",
"attr": "class",
"value" : "IF %0:PossibleVals(curx,cury) THEN \"OnTipFrames\" ELSE \"OffTipFrames\" END"
},
{
"id": "SolveText",
"attr": "class",
"value" : "IF ENABLED(\"Solve\")=TRUE THEN \"normalActionbuttons\" ELSE \"disabledActionbuttons\" END"
},
{
"id": "HelpText",
"attr": "class",
"value" : "IF ENABLED(\"SetCurPosToDetPosition\")=TRUE THEN \"normalActionbuttons\" ELSE \"disabledActionbuttons\" END"
}
],
"events": [
{
"for": {"from":1, "to":9},
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "g_%0_%1",
"event": "SetCurPos",
"predicates" : ["x=%0","y=%1"]
},
{
"for": {"from":1, "to":9},
"id": "button_%0",
"event": "SetBoard",
"predicates" : ["val=%0"],
"hovers": [{ "attr":"class", "enter":"hoverKeypad", "leave":"normalKeypad"}
]
},
{
"id": "SolveCircle",
"event": "Solve",
"hovers": [{ "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"}
]
},
{
"id": "RemoveCircle",
"event": "ClearCurPos",
"hovers": [{ "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"}
]
},
{
"id": "Remove1",
"event": "ClearCurPos",
"hovers": [{ "id": "RemoveCircle", "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"}
]
},
{
"id": "Remove2",
"event": "ClearCurPos",
"hovers": [{ "id": "RemoveCircle", "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"}
]
},
{
"id": "TipCircle",
"hovers": [{ "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"},
{ "id":"TipFrame", "attr":"visibility", "enter":"visible", "leave":"hidden"}
]
},
{
"id": "HelpCircle",
"event": "SetCurPosToDetPosition",
"hovers": [{ "attr":"class", "enter":"hoverKeypad", "leave":"normalKeypad"}
]
},
{
"id": "HelpIcon",
"event": "SetCurPosToDetPosition",
"hovers": [{ "id": "HelpCircle", "attr":"class", "enter":"hoverKeypad", "leave":"normalKeypad"}
]
},
{
"id": "newGameRect",
"event": "SetPuzzle",
"hovers": [{ "attr":"class", "enter":"hoverKeypad", "leave":"normalKeypad"}
]
}
]
}