Commit 66036880 authored by Camil Staps's avatar Camil Staps 🍃

Merge remote-tracking branch 'origin/server-and-client-side-svg-rendering'...

Merge remote-tracking branch 'origin/server-and-client-side-svg-rendering' into server-and-client-side-svg-rendering-with-abc-interpreter
parent 76a05ff1
......@@ -7,7 +7,6 @@ from StdClass import class zero, class ~
import Data.Maybe
import Data.GenFDomain
import Data.GenEq, Data.GenLexOrd, Control.GenMap
import iTasks.UI.JS.Encoding
derive class iTask TraxSt, Coordinate, TileEdge, LineColor
......@@ -15,8 +14,6 @@ derive class iTask TraxSt, Coordinate, TileEdge, LineColor
= { end1 :: !TileEdge // the red line at one end and
, end2 :: !TileEdge // the red line at the other end
}
derive JSEncode TraxTile
derive JSDecode TraxTile
derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
......@@ -46,8 +43,6 @@ other_edge :: !TraxTile !TileEdge -> TileEdge
| East // the east side of a tile, or at
| South // the south side of a tile, or at
| West // the west side of a tile
derive JSEncode TileEdge
derive JSDecode TileEdge
derive gFDomain TileEdge
derive gLexOrd TileEdge
instance == TileEdge
......@@ -65,8 +60,6 @@ instance ~ LineColor
= { col :: !Int // a column-coordinate
, row :: !Int // a row-coordinate
}
derive JSEncode Coordinate
derive JSDecode Coordinate
instance == Coordinate
instance < Coordinate
instance zero Coordinate
......@@ -83,8 +76,6 @@ row :: !Coordinate -> Int
:: Trax
derive JSEncode Trax
derive JSDecode Trax
derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
......@@ -194,9 +185,6 @@ mandatory_moves :: !Trax !Coordinate -> Trax
, choice :: !Maybe Coordinate
}
derive JSEncode TraxSt, User
derive JSDecode TraxSt, User
/** game_over @st:
returns True only if the given configuration in @st.trax contains one or more
lines that connect opposite board edges, or one or more closed loops.
......
......@@ -9,7 +9,6 @@ from Data.List import lookup, deleteFirstsBy, hasDup, qfoldl
import Data.Maybe
import Data.GenFDomain
import Data.GenLexOrd, Control.GenMap, Text.GenPrint
import iTasks.UI.JS.Encoding
import Text
lookup1 x = fromJust o (lookup x)
......@@ -17,8 +16,6 @@ lookup1 x = fromJust o (lookup x)
derive class iTask TraxSt, Coordinate, TileEdge, LineColor
derive gMap Maybe
derive JSEncode TraxTile
derive JSDecode TraxTile
derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
......@@ -67,8 +64,6 @@ instance ~ TraxTile where ~ tile = lookup1 tile [(horizontal,vertical )
,(southeast, northwest )
]
derive JSEncode TileEdge
derive JSDecode TileEdge
derive gFDomain TileEdge
derive gLexOrd TileEdge
instance == TileEdge where == e1 e2 = e1 === e2
......@@ -84,8 +79,6 @@ instance == LineColor where == c1 c2 = c1 === c2
instance ~ LineColor where ~ RedLine = WhiteLine
~ WhiteLine = RedLine
derive JSEncode Coordinate
derive JSDecode Coordinate
derive gLexOrd Coordinate
instance == Coordinate where == c1 c2 = c1 === c2
instance < Coordinate where < c1 c2 = (c1 =?= c2) === LT
......@@ -130,8 +123,6 @@ go West = west
:: Trax // actually, Trax ought to be opaque
= { tiles :: ![(Coordinate,TraxTile)] // tiles that are placed on a certain location
}
derive JSEncode Trax
derive JSDecode Trax
derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
......@@ -365,10 +356,6 @@ where
move :: !Trax !Coordinate -> Trax
move trax filler = add_tile filler (hd (possible_tiles (linecolors trax filler))) trax
derive JSEncode TraxSt, User
derive JSDecode TraxSt, User
game_over :: !TraxSt -> Bool
game_over st=:{trax}
= not (isEmpty winners)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment