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 program will allow a user to attempt to guess a randomly generated number.""" | |
from random import randint | |
from time import sleep | |
def get_user_guess(): | |
user_guess = int(raw_input("What's your whole-number guess? ")) | |
return user_guess | |
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 is a game of Rock, Paper, Scissors against the computer! | |
""" | |
from random import randint | |
from time import sleep | |
options = ["R", "P", "S"] | |
LOSE_MESSAGE = "Sorry, better luck next time!\n" |
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
""" | |
--- Battleship --- | |
Make multiple battleships: you'll need to be careful because you need to make sure that you don’t place battleships on top of each other on the game board. You'll also want to make sure that you balance the size of the board with the number of ships so the game is still challenging and fun to play. | |
Make battleships of different sizes: this is trickier than it sounds. All the parts of the battleship need to be vertically or horizontally touching and you’ll need to make sure you don’t accidentally place part of a ship off the side of the board. | |
Make your game a two-player game. |
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
# Outputs a plain-text formatted explicity declared Powershell array from a new-line separated list of items that is pasted or manually typed by the user. | |
# Written in Python 3.6.2. | |
# [email protected] | |
items = [] | |
userinput = input("Please enter the first list item: ") | |
items.append(userinput) | |
i = 2 |
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
// Reg Cockpit (Miner) | |
@0 AutoLCD | |
Center <Ores Aboard> | |
echo | |
InvListXS {T:*} +ore | |
@1 AutoLCD | |
Center <Energy Status> | |
PowerStored {T:Battery} |
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
//description.ext or controls.hpp | |
#include "\a3\ui_f\hpp\defineCommon.inc" | |
#define CT_CONTROLS_TABLE 19 | |
class TestDisplay | |
{ | |
idd = -1; | |
class controls | |
{ | |
class _CT_CONTROLSTABLE |
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
{ | |
staffIconHelper = [{ | |
{ | |
// skip if not safe start | |
if (!phx_safetyEnabled) exitWith {}; | |
// skip if ACE spectator is drawing group/name icons so as not to clash | |
if (missionNamespace getVariable "ace_spectator_drawunits") exitWith {}; | |
_staff = missionNamespace getVariable["staffInfo", nil]; |
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
script that uses the url_fetch x64 extension to poll (every 180 seconds) a PHP site with a query param of playerUID to return an array containing player name and staff role, which is then folded into a broadcast variable and used on clients for rendering 3d icons, measuring restrictions, etc. |
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
// fired EH for non-bullets | |
// on any projectile that's not a bullet, draw a marker that tracks its position and persists 5 seconds after it 'dies' | |
// smoke grenades die when smoke stops coming out. frag grenades, explosives die after explosion. | |
{ | |
_x addEventHandler["Fired", { | |
_this spawn { | |
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; |
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
uses CBA function to add init code to the magazine that's placed, ACE_Explosives_Placed{classname} which gets the pos & execVMs a sideloaded script file | |
waits for magazine (placed, unarmed mine obj) to be objNull | |
checks for ammo obj in vicinity of magazine pos | |
if null, then mine was picked back up | |
if present, was armed and now an ammo obj exists as armed mine | |
gets info about armed mine, incl displayname of defaultMagazine property in config | |
waits for armed mine to be objNull |
OlderNewer