Skip to content

Instantly share code, notes, and snippets.

@manvijain06
manvijain06 / rts.py
Created May 26, 2015 09:41
This Python script is a basic RTS game, with a modified version of Lanchester's Square Law to calculate eventual attrition rates, as well as force sizes, for two opposing forces. It is adapted from a sample IronPython module, and works on CPython, Jython and other Python toolchains as well.
print 'RTS Simulator.'
# Import random numbers.
try:
# this should be the normal path if Python has access to the standard library.
import random
except:
# This is a fallback for IronPython when running wihtout access to the standard library
import _random as random
@manvijain06
manvijain06 / iwo-jima-lanchester.ipynb
Created May 26, 2015 09:37
This gist is a sample notebook for modeling the battle of Iwo Jima from a broad perspective, using Lanchester's Square Law.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.