Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
void Start() | |
{ | |
int spawned = 0; | |
while (spawned < numToSpawn) | |
{ | |
position = new Vector3(Random.Range(100.0F, 1000.0F), 70, Random.Range(100.0F, 1000.0F)); | |
Instantiate(ammoDrop, position, Quaternion.identity); | |
spawned++; | |
} |
This file contains hidden or 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
#include <iostream> | |
#include <iomanip> | |
#define BINARY(x) 0b##x | |
const short UPPER_LEFT = BINARY(100000000); | |
const short FULL_BOARD = BINARY(111111111); | |
const short HORIZ_0 = BINARY(111000000); |
This file contains hidden or 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
// Ant Foraging Simulator | |
// Jacob Conrad Martin | |
// http://jacobconradmartin.com | |
import processing.video.*; | |
MovieMaker mm; | |
// *** CONFIG *** | |
int worldWidth = 400; |
This file contains hidden or 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
using System; | |
namespace PiDay | |
{ | |
// The probability of two random numbers to be coprime is P = 6 / Pi^2 | |
// So let's generate a bunch of random numbers. Figure out how often they're coprime. | |
// Use that percentage as our probabilty and solve for Pi. | |
// Pi = sqrt(6 / P) | |
// For more info, watch the video where I stole the idea: https://youtu.be/RZBhSi_PwHU |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
Getopt::Long::Configure("pass_through"); | |
use Pod::Usage; | |
our $APP = 'perl_test'; |
This file contains hidden or 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
# Patrol the village entrances. | |
# Build a "fire-trap" when you see an ogre. | |
# Don't blow up any peasants! | |
loop: | |
self.moveXY(43, 50) | |
if self.findNearestEnemy(): | |
self.buildXY("fire-trap", 43, 50) | |
self.moveXY(25, 34) | |
if self.findNearestEnemy(): |
NewerOlder