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
// STEP 1 | |
// cardinality = 36 | |
// type PlayerScore = | |
// | Love | |
// | Fifteen | |
// | Thirty | |
// | Forty | |
// | Game | |
// | Advantage |
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
type CellShape = Cell | Empty | |
let createCell shape = | |
seq { | |
yield! Seq.map (fun _ -> shape) [1..10] | |
} | |
let generate () = | |
seq { | |
yield! Seq.map (fun _ -> createCell Cell) [1..10] |
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
let ticketsVendus souches = List.concat souches | |
let filtrerLotsDéjàTirés lots ticketsTirés = | |
lots | |
|> List.filter (fun x -> | |
not (ticketsTirés | |
|> List.exists (fun y -> fst y = x))) | |
let filtrerTicketsDéjàTirés tickets ticketsTirés = | |
tickets |
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
// Learn more about F# at http://fsharp.net | |
// See the 'F# Tutorial' project for more help. | |
open System.IO | |
let nothing filtered item previousItem position = | |
Seq.append filtered [item] | |
let reverse filtered item previousItem position = | |
Seq.append [item] filtered |
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
open System | |
type Payer = { Num: int } | |
type GameParameters = { PlayersNb : int; CurrentPlayerId: int; DronesNb: int; ZonesNb: int } | |
type ZoneCoordonne = { Num: int; CenterX: int; CenterY: int } | |
type ControlledZone = { Coordonne: ZoneCoordonne; Player: int } | |
type FreeZone = { Coordonne: ZoneCoordonne } | |
type Zone = | |
| FreeZone of FreeZone |