So far I have already managed to do most of it, but what Im really stuck at is the visuals. I want it so that when you guess a letter, it appears on the screen, what i cannot do is set each empty tile to one of the letters from the word.
Here is some what I have so far:
var/list/Words = list("Apple","Orange","Grape")
var/active_word = ""
var/activated = 0
mob/verb/Guess_Letter()
set name = "Guess Letter"
Set_Word()
src.GuessLetter()
proc/Set_Word()
if(activated) return
active_word = pick(Words)
activated = 1
mob/proc/GuessLetter()
var/guess = input("Enter a letter please") as text|null
if(length(guess)==1)
if(findtext(active_word,guess))
src<<"You got the letter <font color=red>[guess]</font>!"
sleep(10)
switch(alert("Which would you like to do now?","Hangman","Guess Letter","Guess Word"))
if("Guess Letter")
src.GuessLetter()
if("Guess Word")
src.GuessWord()
else
src<<"Better luck next time! ([active_word])"
return
else
src<<"You may only enter one letter."
return
I'd appreciate any help, thanks.
Zythyr ++