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
# Warmup-1 | |
def sleep_in(weekday, vacation): | |
if weekday and not vacation: | |
return False | |
return True | |
def monkey_trouble(a_smile, b_smile): | |
if a_smile and not b_smile or not a_smile and b_smile: | |
return False | |
return True |
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
//*** Reflection.cpp *** | |
#include "Reflection.h" | |
#define _CRT_SECURE_NO_WARNINGS | |
#include <assert.h> | |
#include <string.h> |
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
commit e5a93132107d83b207209f76fc116f45973a7d87 | |
Author: Richard Marks <ccpsceo@gmail.com> | |
Date: Mon Sep 1 05:27:49 2014 -0500 | |
fixed code to pass jshint checks | |
diff --git a/lib/quintus.js b/lib/quintus.js | |
index fda2556..2567152 100644 | |
--- a/lib/quintus.js | |
+++ b/lib/quintus.js |
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
package com.mygdx.game; | |
import aurelienribon.tweenengine.*; | |
import aurelienribon.tweenengine.equations.Bounce; | |
import com.badlogic.gdx.ApplicationAdapter; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.Texture; | |
import com.badlogic.gdx.graphics.g2d.Sprite; | |
import com.badlogic.gdx.graphics.g2d.SpriteBatch; |
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
#!/usr/bin/python | |
import os, sys | |
from xml.dom import minidom | |
#-------------------------------------- | |
BASE_PATH = os.path.dirname(__file__) | |
MAP_SRC_DIR = os.path.join(BASE_PATH, 'data/maps') | |
MAP_COMPILED_DIR = os.path.join(BASE_PATH, 'data/maps/compiled') |
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
package | |
{ | |
import flash.desktop.NativeApplication; | |
import flash.events.Event; | |
import flash.events.NativeWindowBoundsEvent; | |
import net.flashpunk.Engine; | |
import net.flashpunk.FP; | |
import net.flashpunk.Screen; | |
/** | |
* ... |
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
// Screen.as PATCH Richard Marks <ccpsceo@gmail.com> - Jan 07, 2011 | |
/** | |
* resizes the screen - updates FP dimension variables | |
* you should not do this a lot, there will be lag. | |
* @param width new width of the screen | |
* @param height new height of the screen | |
*/ | |
public function resize(width:uint, height:uint):void | |
{ | |
// tell FP the screen size has changed |
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
; hello.ecpua | |
inc 0x0A | |
print ; newline | |
inc 0x3E | |
print ; H | |
inc 0x1D | |
print ; e | |
inc 0x07 | |
print ; l | |
print ; l |
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
// Add to MapEntity.as - this is not the full MapEntity.as file. | |
/** | |
* checks if there is a warp that collides with the specified entity | |
* @param e - the entity to test collision against | |
* @return null if no warp is found, and the WarpPoint object if there is one | |
*/ | |
public function CheckWarpCollidesWith(e:Entity):WarpPoint | |
{ | |
// loop through each warp in the warps container |
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
// sprites.png is 640x240 with the left 320x240 holding player sprite frames | |
// and the right 320x240 holding the enemy frames | |
[Embed(source="../assets/sprites.png")] private const SPRITES_PNG:Class; | |
var sprites:BitmapData = (new SPRITES_PNG).bitmapData; | |
var playerSprites:BitmapData = new BitmapData(320, 240); | |
var enemySprites:BitmapData = new BitmapData(320, 240); | |
playerSprites.copyPixels(sprites, new Rectangle(0,0, 320, 240), new Point); |
OlderNewer