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
''' | |
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 | |
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
<!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 { |
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
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 |
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 UnityEngine; | |
using System.Collections; | |
public class MapGenerator : MonoBehaviour { | |
Sprite[] tileSprites; | |
int[,] tileMap; | |
float[,] values; | |
int width, height; |