Brettspiele: Havannah

data Hexagon = Hexagon { breit :: Int }
data Havannah = Havannah
    { h_shape :: Hexagon
    , stones :: Array Farbe ( Set Point )
    , ist_dran :: Farbe
    }
instance Shaped Havannah Hexagon where
    shaped h = Havannah { h_shape = h
        , stones = array (Schwarz, Weiss)
               [ ( Schwarz, emptySet ), ( Weiss, emptySet ) ]
        , ist_dran = Schwarz
        }
data Satz = Put Point | Pass | Resign
instanz Zug Havannah Satz where
    erlaubt s z = ...
    next s z = if erlaubt s z then case z of (Put p) -> ...



Johannes Waldmann 2004-11-30