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
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 |
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 Nothingland | |
{ | |
internal class World | |
{ | |
internal int BoardWidth = 8; | |
internal int BoardHeight = 8; | |
} | |
class Program |
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 Tokenland | |
{ | |
internal class World | |
{ | |
internal int BoardWidth = 8; | |
internal int BoardHeight = 8; | |
internal int TokenColumn = 1; | |
internal int TokenRow = 1; |
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
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(){ |
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
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 |
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
#pragma once | |
#include <functional> | |
#include <map> | |
#include <memory> | |
#include <optional> | |
#include <vector> | |
#include <set> | |
namespace maze | |
{ | |
template<typename TDirection, typename TDoor> |
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
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 = {} |