Skip to content

Instantly share code, notes, and snippets.

View Jakemangan's full-sized avatar

Jake Mangan Jakemangan

View GitHub Profile
//handles updating the game state, moving the objects, and handling collisions.
#include <stdlib.h>
#include <time.h>
#include "gamestate.h"
#include <mbed.h>
//missiles
static const int heapsizeM = 20;
static node_t heapM[heapsizeM];
//exposes the parts of the model needed elsewhere. Such as the fire function called by the controller.
#include <math.h>
#define PI 3.14159265358979323846
typedef struct particle{
float x;
float y;
begin
LDA #10 ;load $0A into accumulator
LDX $15 ;load $15m into X
_loop TAX ;transfer A to X
SEC ;set carry flag
end
public void test_SBC_DecimalMode() throws MemoryAccessException {
bus.write(0xab40, 0x01);
bus.write(0xab50, 0x11);
bus.loadProgram(0xf8, // SED
0xa9, 0x00, // LDA #$00
0xf9, 0x10, 0xab); // SBC $ab10,Y
cpu.setYRegister(0x30);
cpu.step(3);
assertEquals(0x98, cpu.getAccumulator());
import java.util.List;
import java.util.Arrays;
class Challenge {
private static Integer[] input;
private static int inputLength;
private static String concatBinary;
private static int resultantValue;
class Challenge {
private static String hashes;
private static String content;
private static int numHashes;
/*
* Parses input markdown into HTML header format
* @Param String markdown - String holding markdown string for converstion
* @Return String output - HTML format of input markdown
class Challenge {
private static char[] chars;
private static int indexOfFirstNonRepeat;
/*
* @Param String input - String to be tested for first repeated character
* @Return String firstNonRepeatSensitive - String containing single character that represents first
* non-repeated character in input string (case-sensitive)
*/
public static String firstNonRepeatingLetter(String input)
package core;
import java.util.ArrayList;
import java.util.Scanner;
/*
* Design principles ideas to implement
* - Reduce responsibility of this class, move excess functionality into different classes
* -> Order builder class, instead of building orders within this class
* -> Printer class?
package test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
import core.BrickOrder;
package core;
import java.util.ArrayList;
/*
* OrderDB class stores all of the orders created by OrderSystem
* within an ArrayList<BrickOrder> variable. The stored ArrayList
* can be returned to OrderSystem at any time for updating and
* information extraction.
*/
public class OrderDB {