Skip to content

Instantly share code, notes, and snippets.

View paytonrules's full-sized avatar

Eric Smith paytonrules

View GitHub Profile
-(void) testRunsWithGameScene
{
MockProducer *producer = [[[MockProducer alloc] init] autorelease];
MadBomberAppDelegate *delegate = [[[MadBomberAppDelegate alloc] init] autorelease];
delegate.producer = producer;
[delegate applicationDidFinishLaunching: nil];
STAssertEquals([producer.initialScene class], [[GameScene scene] class], nil);
STAssertEqualObjects(producer.initialWindow, delegate.window, nil);
# In App Delegate
-(void) initializeDirector
{
[self.producer initializeDirectorWithWindow:window scene:[GameScene scene]];
}
# In my Producer Object
-(void) initializeDirectorWithWindow:(UIWindow *) window scene:(Scene *) scene
{
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
-(void) initializeDirector
{
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
[[Director sharedDirector] setAnimationInterval:1.0/60];
[[Director sharedDirector] setDisplayFPS:YES];
// create an openGL view inside a window
[[Director sharedDirector] attachInView:window];
[[Director sharedDirector] runWithScene: [GameScene scene]];
657 void callback() {
658 // Lift = R(0, 1, 0) |K| (sin theta)
659 // Drag = -K (sin theta)
660 // Where theta is the angle between w (planes direction) and K
661 // This should be direction of - not velocity -
662 // You've got velocity * R (the rotation) u = R(velocity)
663 // K ends up as the actual direction of motion
664 // plane->K + plane->R * Vector(0, 0, +1) Add a constant
665 if (engineSpeed != 0) {
666 // Apply Thrust
So I upgraded XCode
Which caused my build to fail
Which required upgrading Xamarin
Which caused my program to build, but crash
Which requires manually building monomac
class DecimalStringComparer
def self.compare_decimal(a, b)
new(a, b).execute
end
def initialize(a, b)
@a = a
@b = b
end
@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 []]
(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
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());
}

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: