Skip to content

Instantly share code, notes, and snippets.

@errorseven
errorseven / Hangman.ahk
Last active February 17, 2018 01:30
/r/DailyProgrammer [2014-11-17] Challenge #189 [Easy] Hangman!
#Persistent
#SingleInstance, Force
SetTitleMatchMode, 2
SetWorkingDir, %A_ScriptDir%
;Ask player to Enter Mode of play Easy, Medium, Hard
InputBox, Mode, Daily Programmer Challenge #189, Please enter [Easy] [Intermediate] or [Hard] , 640, 480
If (ErrorLevel = 1) ;If Cancel or Close Exit
ExitApp
If !(Mode == "Easy" Or Mode == "Intermediate" or Mode == "Hard") { ;If not Easy, Intermediate, or Hard Reload!
@errorseven
errorseven / NameGame.ahk
Created May 24, 2015 14:28
/r/DailyProgrammer [2015-04-20] Challenge #211 [Easy] The Name Game
#SingleInstance Force
#Persistent
; I changed the names a bit for testing purposes
TheNameGame := new NameGame("Arnold!")
MsgBox % TheNameGame.get_MyMethod()
TheNameGame := new NameGame("Albert!")
MsgBox % TheNameGame.get_MyMethod()
TheNameGame := new NameGame("Melvin!")
MsgBox % TheNameGame.get_MyMethod()
@errorseven
errorseven / WordsWithEnemies.ahk
Created May 24, 2015 14:29
/r/DailyProgrammer [2015-01-19] Challenge #198 [Easy] Words with Enemies
a =
( Join`s
because cause
hello below
hit miss
rekt pwn
combo jumbo
critical optical
isoenzyme apoenzyme
tribesman brainstem
@errorseven
errorseven / ISBN.ahk
Created May 24, 2015 14:31
/r/DailyProgrammer [2015-01-12] Challenge #197 [Easy] ISBN Validator
If validate_Isbn("156881111X") {
MsgBox % "156881111X is a Valid ISBN Number!"
}
If validate_Isbn("0-7475-3269-9") {
MsgBox % "0-7475-3269-9 is a Valid ISBN Number!"
}
x := generate_isbn()
@errorseven
errorseven / DNA.ahk
Created May 24, 2015 14:34
/r/DailyProgrammer [2015-03-23] Challenge #207 [Easy] Bioinformatics 1: DNA Replication
Nput := "A A T G C C T A T G G C"
for each, Char in StrSplit(Nput, a_space, "`r")
{
Output .= Swap(Char) . " "
}
MsgBox % Nput . "`n" . Output
Swap(x)
@errorseven
errorseven / FalloutHackingGame.ahk
Last active February 14, 2019 02:12
/r/DailyProgrammer [2015-10-28] #238 [Intermediate] Fallout Hacking Game
/* #238 [Intermediate] Fallout Hacking Game
Coded by errorseven @ 10312015
*/
SetBatchLines -1
;+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
; VARIABLES AND OBJECTS
;+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
@errorseven
errorseven / PackingASentence.ahk
Created July 12, 2016 03:00
/r/DailyProgrammer [2015-04-08] Challenge #209 [Intermediate] Packing a Sentence in a Box
MsgBox % boxit("EVERYWHERE IS WITHIN WALKING DISTANCE IF YOU HAVE THE TIME")
MsgBox % boxit("IT IS RAINING CATS AND DOGS OUT THERE")
boxit(z) {
StringReplace, z, z, %A_SPACE%, , All ;remove spaces
r := box(z), i := 1, d := "1, 1", x := []
loop % r {
count++
if !mod(count, 2) {
y := SubStr(z, i,r)
@errorseven
errorseven / ToDoList.ahk
Last active February 17, 2018 01:16
/r/DailyProgrammer [2015-06-15] #218 [Easy] To Do List
MyList := New ToDo()
MyList.Set("Go Shopping")
MyList.Set("Go to bank")
MyList.Display()
MyList.Set("Buy Fallout 4")
MyList.Remove("Go to bank")
MyList.Display()
@errorseven
errorseven / ManglingSentences.ahk
Created July 12, 2016 03:16
/r/DailyProgrammer [2015-06-22] #220 [Easy] Mangling sentences
ChallengeInput =
(
Eye of Newt, and Toe of Frog, Wool of Bat, and Tongue of Dog.
Adder's fork, and Blind-worm's sting, Lizard's leg, and Howlet's wing.
For a charm of powerful trouble, like a hell-broth boil and bubble.
)
For each, Line in StrSplit(ChallengeInput, "`n", "`r") {
For each, Word in StrSplit(Line, " ", "`r") {
AlphaWord :=
@errorseven
errorseven / WordSnake.ahk
Created July 12, 2016 03:18
/r/DailyProgrammer [2015-06-29] #221 [Easy] Word snake
ChallengeInput =
(
CAN NINCOMPOOP PANTS SCRIMSHAW WASTELAND DIRK KOMBAT TEMP PLUNGE ESTER REGRET TOMBOY
)
table := []
Loop % StrLen(ChallengeInput) {
row := A_Index
Loop % StrLen(ChallengeInput) {