This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lge.metr | |
import org.scalacheck.Properties | |
import org.scalacheck.Prop.forAll | |
import org.scalacheck.Prop.BooleanOperators | |
import org.scalacheck.Prop.classify | |
import org.scalacheck.Prop.collect | |
import org.scalacheck.Arbitrary | |
import org.scalacheck.Arbitrary._ | |
import org.scalacheck._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package streams | |
import common._ | |
/** | |
* This trait represents the layout and building blocks of the game | |
* | |
* @TODO: SHOULD RENAME `x` and `y` in class Pos to `row` and `col`. It's | |
* confusing to have `x` being the vertical axis. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object waterpouring { | |
type State = (Int, Int) | |
val initState = (0, 0) | |
val target = 6 | |
val limit = (4, 9) | |
abstract class Action { | |
def apply(current:State):State | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
import Data.Char | |
import Control.Monad | |
-- transpose | |
input="A-small-practice.in" | |
data Result = WinX | WinO | Draw | DontKnow deriving (Show, Eq) | |
type Board = [String] | |
whoWin :: Board -> Result | |
whoWin b |