Skip to content

Instantly share code, notes, and snippets.

View Spartan322's full-sized avatar

George L. Albany Spartan322

View GitHub Profile
@Spartan322
Spartan322 / Fig-8.bs2
Created March 4, 2016 15:00
WHS Robotics 2016 - George & Visal: Vorge
' SumoBot-2.2-Motor-Test.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]-------------------------------------------------
LMotor PIN 13 ' left servo motor
RMotor PIN 12 ' right servo motor
' -----[ Constants ]-------------------------------------------------------
// package and imports
public interface IWardPlacer extends IScriptObject {
/**
* Creates a Ward Entity that can trigger wards itself
*
* @param instance
* The instance of the script
* @param world
* The world to place in
' SumoBot-5.1-Basic-Competition-Program.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]-------------------------------------------------
LMotor PIN 13 ' left servo motor
RMotor PIN 12 ' right servo motor
LLinePwr PIN 10 ' left line sensor power
' SumoBot-4.2-IR-Scan.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]-------------------------------------------------
LMotor PIN 13 ' left servo motor
RMotor PIN 12 ' right servo motor
LfIrOut PIN 4 ' left IR LED output
// package and imports
public class ScriptData {
// idToDataList stores word data according to whether words can be identified to it
Map<Integer, Map<String, String>> idToDataList;
// wordLocations will be searched for words using Collections#contains(Object) and will return the integer id if it returns true
List<Collection<String>> wordLocations;
/**
* Retrieves a data map for a word
*
package /* package */;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.GameRules;
import net.minecraft.world.GameRules.ValueType;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.WorldEvent;
//META{"name":"emojiAPI"}*//
var emojiAPI = function () {};
emojiAPI.prototype.emojiList = {};
emojiAPI.prototype.addEmoji = function(containerId, json) {
var emoji = JSON.parse(json);
emojiAPI.prototype.emojiList[containerId] = emoji;
};
Function::get = (props) ->
@::__defineGetter__ name, func for name, func of props
Function::set = (props) ->
@::__defineSetter__ name, func for name, func of props
Function::Symbol = (props) ->
@::[Symbol[name]] = func for name, func of props
Function::static =
#include <cstdlib>
#include <random>
#include <vector>
#include <iostream>
#include <SFML/Graphics.hpp>
class Grid {
const int MIN_SURROUND = 2;
const int MIN_SURROUND_SWITCH = 3;
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 2600 Six-Core Processor
CPU Family: 0x17