Skip to content

Instantly share code, notes, and snippets.

View coltonoscopy's full-sized avatar

Colton Ogden coltonoscopy

View GitHub Profile
@coltonoscopy
coltonoscopy / drawnums.py
Created May 7, 2019 21:32
Spritesheet numbering script
'''
Adds numbers to a sprite sheet for easy reference.
'''
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
if __name__ == '__main__':
TILE_SIZE = 16
@coltonoscopy
coltonoscopy / ticTacToe.html
Created January 20, 2019 02:58
Colton's implementation of Tic Tac Toe in HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Tic Tac Toe</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<style>
body {
function Entity:attemptPath(pathX, pathY)
-- acquire path
repeat
self.path = self.map.finder:getPath(self.tileX, self.tileY, pathX, pathY)
pathX = math.random(self.map.mapWidth)
pathY = math.random(self.map.mapHeight)
until self.path
-- chain movements in path
if self.path then
using UnityEngine;
using System.Collections;
public class MapGenerator : MonoBehaviour {
Sprite[] tileSprites;
int[,] tileMap;
float[,] values;
int width, height;