This file contains 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
-- | |
-- Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2311549480 | |
-- | |
setup_button_guid = "d6b9ab" | |
function onLoad() | |
button_setup("Randomize Players", setup_button_guid, 'setUp', 7000, 2000, 800) | |
end | |
function setUp() |
This file contains 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
-- Example on how to take a die from a shuffled bag | |
-- and put the die on its space. | |
-- A reply to this question on Reddit: | |
-- https://www.reddit.com/r/tabletopsimulator/comments/eft9h6/scripting_how_to_randomly_choose_objects_in_a_bag/ | |
d20_guid = "2f4af6" | |
d12_guid = "d90df3" | |
d10_guid = "327eec" | |
d8_guid = "213698" | |
d4_guid = "0b8595" |
This file contains 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
-- | |
-- This script assumes that you're playing with three players | |
-- Blue, Yellow and Green. | |
-- | |
-- All the guids are from the save-file that I used | |
-- to the develop this scipt. Some of the guids, like the bags | |
-- are probably the same, but the decks will surely be different | |
-- | |
-- Use this file as inspiration for your own hacking. | |
-- |
This file contains 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
git config --global alias.lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%a>%Creset' --abbrev-commit --date=short --branches -20" |
This file contains 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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains 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 scala.util.Random | |
import scala.collection.mutable.ListBuffer | |
abstract class Door | |
case class Car() extends Door | |
case class Goat() extends Door | |
class Game(val doors:List[Door] = Random.shuffle(List(Goat(), Goat(), Car()))) { | |
var playerDoor = -1 | |
var montyDoor = -1 |
This file contains 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 scala.util.{Random} | |
import scala.collection.mutable.{ListBuffer} | |
class Game(doors: ListBuffer[Symbol] = Random.shuffle(ListBuffer('Car, 'Goat, 'Goat))) { | |
var playerDoor:Symbol = _ | |
var montyDoor:Symbol = _ | |
if (doors.count(_ == 'Car) != 1 || doors.count(_ == 'Goat) != 2) { | |
throw new IllegalArgumentException("Should be one Car and two Goats") | |
} |