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 java.util.*; | |
class Test{ | |
public static final Map<String,Integer> MYHASH; | |
static{ | |
Hashtable<String,Integer> tmp = | |
new Hashtable<String,Integer>(); | |
tmp.put("A",65); | |
tmp.put("C",67); | |
MYHASH = Collections.unmodifiableMap(tmp); |
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 java.util.HashMap; | |
/** | |
* HashMap example to show the mapping of a String to an Integer | |
* | |
* @author benjo charlie | |
* @version 1.2 | |
* Changelog: Changed Map to Static Final. | |
*/ | |
public class CountryAgeOfMagority |
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/python | |
from random import randrange | |
global laser_gun | |
laser_gun = 'fists' | |
global laser_power | |
laser_power = 0 | |
class Scene(object): |
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
stair_blocks = { | |
'BRICK_STAIRS': 108, | |
'COBBLESTONE_STAIRS': 67, | |
'NETHER_BRICK_STAIRS': 114, | |
'OAK_STAIRS': 53, | |
'OAK_STAIRS2': 59, | |
'QUARTZ_STAIRS': 156, | |
'SANDSTONE_STAIRS': 128, | |
'STONE_BRICK_STAIRS': 109, | |
'STONE_STAIRS': 67, |
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
building_blocks = { | |
'AIR': 0, | |
'BEDROCK': 7, | |
'BEDROCK_INVISIBLE': 95, | |
'BRICK_BLOCK': 45, | |
'CHEST': 54, | |
'CLAY': 82, | |
'COAL_ORE': 16, | |
'COBBLESTONE': 4, | |
'CRAFTING_TABLE': 58, |
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/python | |
from random import randrange | |
class Axe(object): | |
def __init__(self): | |
self.start = "Schist!" | |
def gimli(self): |
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/python3.4 | |
#----------Minecraft Pi Chat---------# | |
#-----------By PieCoder314-----------# | |
#---Bringing chat to minecraft pi!---# | |
# Credit to: PieCoder314/mcpichat.py # | |
from mcpi import minecraft | |
mc = minecraft.Minecraft.create() | |
mc.postToChat("Go to python shell to chat.") |
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
AIR | 0 | |
---|---|---|
BEDROCK | 7 | |
BEDROCK_INVISIBLE | 95 | |
BRICK_BLOCK | 45 | |
CHEST | 54 | |
CLAY | 82 | |
COAL_ORE | 16 | |
COBBLESTONE | 4 | |
CRAFTING_TABLE | 58 | |
DIAMOND_BLOCK | 57 |
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
BRICK_STAIRS | 108 | |
---|---|---|
COBBLESTONE_STAIRS | 67 | |
NETHER_BRICK_STAIRS | 114 | |
OAK_STAIRS | 53 | |
OAK_STAIRS | 59 | |
QUARTZ_STAIRS | 156 | |
SANDSTONE_STAIRS | 128 | |
STONE_BRICK_STAIRS | 109 | |
STONE_STAIRS | 67 | |
WOOD_STAIRS | 53 |
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/python3.4 | |
#-------------------------------------------------------------------------- | |
# Name: A simple compass for Minecraft Pi | |
# Purpose: Designed to indicate NORTH with a red block and SOUTH with | |
# a black block. | |
# Author: benjo charlie | |
# Created: 2016 | |
#-------------------------------------------------------------------------- | |
# Import libraries and set up the globals |