Skip to content

Instantly share code, notes, and snippets.

View paytonrules's full-sized avatar

Eric Smith paytonrules

View GitHub Profile
let lookupImageKey = function
| EntityType.Laser _ -> Laser
| EntityType.Bullet _ -> Bullet
| _ -> LargeInvaderOpen
let lookupImage imageKey = Map.tryFind imageKey lookupTable
let positionImage image entity =
match entity with
| EntityType.Laser e -> {Image = image;

Mutli-arity function definitions:

You use the "regex" functions. s/? Will say "0 or 1 of this" - so in the spec below 0 or 1 offsets is required.

(s/fdef create
        :args (s/cat
                :character ::character
                :offset (s/? ::offset))
 :ret ::invader)

Todos

  • Figure out when Mom and Dad are showing up.
  • Make sure all the "can't miss" rides are on here. Especially find out if you have to see parades.

Saturday - 22nd, Arrive at Art of Animation

Lunch

  • Hotel probably

Sunday - 23rd, Magic Kingdom (8AM to 7PM)

  • Busses start at 7:15
  • Go straight to Tomorrowland. Head to Space Mountain then Buzz Lightyear.
  • From there you can head to Haunted Mansion/Pirates/Jungle Cruise before Pan, or the Monsters Inc. show in Tomorrowland. Either one.
  • Once you get to Pan you’ll want to stick around FantasyLand FastPass: Pan’s Flight 11:05 Meet Rapunzel 12:20 Seven Dwarves 2:30 Lunch Options:

Sunday - 23rd, Magic Kingdom (8AM to 7PM)

  • Busses start at 7:15
  • Go straight to Tomorrowland. Head to Space Mountain then Buzz Lightyear.
  • From there you can head to Haunted Mansion/Pirates/Jungle Cruise before Pan, or the Monsters Inc. show in Tomorrowland. Either one.
  • Once you get to Pan you’ll want to stick around FantasyLand FastPass: Pan’s Flight 11:05 Meet Rapunzel 12:20 Seven Dwarves 2:30 Lunch Options:
public class MainTest {
@Test
public void ItAssignsTheTitle() throws Exception {
Main main = new TestableMain();
TestStageAdapter stageAdapter = new TestStageAdapter();
main.startPrimaryStage(stageAdapter);
assertEquals("Testing a Form", stageAdapter.getTtle());
}
(defn- minimax-square
[{:keys [board current-player opposing-player player-turn square] :as params}]
(let [new-board (board/take-square board player-turn square)]
(cond
(board/winner? new-board current-player) 10
(board/winner? new-board opposing-player) -10
(board/tie? new-board current-player opposing-player) 0
:else (let [next-player (next-player current-player opposing-player player-turn)
next-board-states (board/open-squares new-board)]
(minimax-for-open-postions
@paytonrules
paytonrules / diffs.clj
Created January 21, 2016 00:40
What we worked on Wednesday
(ns ssiMaps.arrays)
; yuck – a for loop
'(1 2 3 4 5)
'((1 2) (2 3) (3 4) (4 5))
'(1 1 1 1)
(defn diffs-map [values]
(let [sorted-values (sort values)]
(loop [values sorted-values
differences []]
// greatest variance between the opening and closing price.
//
// The following functions may be of use:
//
// abs - takes the absolute value of an argument
//
// System.Double.Parse - converts a string argument into a
// numerical value.
//
// The following function will convert a comma separated string
(defn- uniqueness [map key whatev]
(let [duplicate-projects (find-by-kind (:kind map) :filters [:= key (get map key)])]
(when-not (empty? duplicate-projects)
"must be unique")))