Skip to content

Instantly share code, notes, and snippets.

View playdeezgames's full-sized avatar

TheGrumpyGameDev playdeezgames

View GitHub Profile
local RNG={}
function RNG.FromRange(low,high)
return math.random(low,high)
end
function RNG.FromList(list)
return list[RNG.FromRange(1,#list)]
end
function CreateMazeCell()
local mazeCell = {}
#pragma once
#include <functional>
#include <map>
#include <memory>
#include <optional>
#include <vector>
#include <set>
namespace maze
{
template<typename TDirection, typename TDoor>
cellWidth = 8
cellHeight = 8
cellColumns = 40
cellRows = 30
screenWidth = cellWidth * cellColumns
screenHeight = cellHeight * cellRows
blocks = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
tail=[20,20,20,20,20,20]
direction = 1
playing = False
@playdeezgames
playdeezgames / Nothingland
Created August 9, 2018 10:41
Nothingland in Processing
final int CELL_WIDTH = 32;
final int CELL_HEIGHT = 32;
World world = new World();
void settings(){
size(world.columns * CELL_WIDTH, world.rows * CELL_HEIGHT);
}
void draw(){
@playdeezgames
playdeezgames / Tokenland.cs
Created August 6, 2018 09:00
Tokenland: in which a player moves about an empty grid of squares.
using System;
namespace Tokenland
{
internal class World
{
internal int BoardWidth = 8;
internal int BoardHeight = 8;
internal int TokenColumn = 1;
internal int TokenRow = 1;
@playdeezgames
playdeezgames / Nothingland.cs
Created August 6, 2018 08:57
Nothingland, in which an empy grid of squares is drawn, and the only choice the player has is when to end the game.
using System;
namespace Nothingland
{
internal class World
{
internal int BoardWidth = 8;
internal int BoardHeight = 8;
}
class Program
@playdeezgames
playdeezgames / Jetlag.py
Created June 14, 2018 16:42
JetLag in Python using PyGame
import sys, pygame, random
pygame.init()
pygame.font.init()
tailLength=6
frameTime = 100
zoom = 1
size = width, height = 320 * zoom, 180 * zoom
cellsize = cellWidth, cellHeight = 10 * zoom,10 * zoom
columns = width//cellWidth
rows= height//cellHeight