Skip to content

Instantly share code, notes, and snippets.

View zacharycarter's full-sized avatar
👋

Tail Wag Games zacharycarter

👋
View GitHub Profile
FROM debian:jessie
MAINTAINER Zachary Carter "carterza@gmail.com"
RUN REPO=http://cdn-fastly.deb.debian.org && \
echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update --yes && apt-get install --yes \
automake \
let doc = """
RTS.
Usage:
rts <hostname> <port>
"""
const
ScreenWidth = 960
ScreenHeight = 540
let doc = """
RTS.
Usage:
rts <hostname> <port>
"""
import asyncdispatch, zengine, sdl2, opengl, random, glm, strutils, docopt, websocket, logging, message, json
let args = docopt(doc, version = "RTS 0.1.0")
let doc = """
RTS.
Usage:
rts <hostname> <port>
"""
import asyncdispatch, zengine, sdl2, opengl, random, glm, strutils, docopt, websocket, logging, message, json
let args = docopt(doc, version = "RTS 0.1.0")
+++++++++++++++++++++++++++ +++++++++++++++++++++++++++
######..#######..#####.....####..#########......#####.....####..
#.......#######..#####.....####..#########......###..........#..
...........####..#######..#####.................##...........#..
...........#..#...#....#......#.................##...######..#..
..................#....#......#......#..######.......#.......###
...#####..........#....#......#..#......#....#.......#.......#..
...#...#...#..##.......#................#....#..##...######..#..
####......######.......#...###..........#.......###..........#..
#.........######..#....##..#####.....####.......###..........#..
#........#######..#######..#####.....####....#..####......#####.
#define STB_HERRINGBONE_WANG_TILE_IMPLEMENTATION
#include "stb_herringbone_wang_tile.h"
import random, times, deques
type
DungeonKind {.pure.} = enum
Caves
CellKind {.pure.} = enum
Empty, Floor, Wall, Count
Cell = object
proc season(month: range[1..12]): string =
case month
of 1, 2, 12: return "winter"
of 4, 5, 6: return "spring"
of 7, 8, 9: return "summer"
of 10, 11: return "autumn"
echo season(5) # in.nim(2, 3) Error: not all cases are covered
proc season(month: range[1..12]): string =
case month
of 1, 2, 12: return "winter"
of 4, 5, 6: return "spring"
of 7, 8, 9: return "summer"
of 10, 11: return "autumn"
echo season(5)