Created
December 30, 2018 16:12
-
-
Save jasondown/67a7cfc006f916a402253f5abc6b55f6 to your computer and use it in GitHub Desktop.
This file contains 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
// GameState -> String | |
let getMove (gs : GameState) = | |
let me = gs.Robots |> List.find (fun r -> r.Player = Player.Me) | |
let mySamples = gs.Samples |> List.filter (fun s -> s.CarriedBy = Player.Me) | |
let samplesReady = mySamples |> List.filter (canMakeSample me) | |
let cloudSamples = | |
gs.Samples | |
|> List.filter (fun s -> s.CarriedBy = Player.Cloud) | |
|> List.sortByDescending (fun s -> s.HealthPoints) | |
// more to come | |
"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment